Problem: build fails with PGM + CXX98 + clang++

Solution: redefine 'restrict' which is used as an attribute in PGM headers,
but that is not available when using clang and CXX98
This commit is contained in:
Luca Boccassi 2023-01-11 23:43:13 +00:00
parent 049f79f72e
commit 3919956535

View File

@ -713,6 +713,11 @@ fi
if test "x$have_pgm_library" = "xyes"; then
AC_DEFINE(ZMQ_HAVE_OPENPGM, [1], [Have OpenPGM extension])
# When using CXX98 mode 'restrict will not be defined, so redefine it, as it
# is used in the PGM headers
if test "x$enable_force_CXX98_compat" = "xyes"; then
CPPFLAGS="-Drestrict=__restrict__ $CPPFLAGS"
fi
fi
AM_CONDITIONAL(HAVE_PGM, test "x$have_pgm_library" = "xyes")