Move {SO,LOCAL}_PEERCRED checks to C++ context.

This commit is contained in:
Brandon Carpenter 2013-12-06 10:59:07 -08:00
parent dc5528cba6
commit f0bd333728

View File

@ -349,12 +349,12 @@ if test "x$zmq_disable_eventfd" != "xyes"; then
[AC_DEFINE(ZMQ_HAVE_EVENTFD, 1, [Have eventfd extension.])])
fi
AC_CHECK_DECLS([SO_PEERCRED], [AC_DEFINE(ZMQ_HAVE_SO_PEERCRED, 1, [Have SO_PEERCRED socket option])], [], [#include <sys/socket.h>])
AC_CHECK_DECLS([LOCAL_PEERCRED], [AC_DEFINE(ZMQ_HAVE_LOCAL_PEERCRED, 1, [Have LOCAL_PEERCRED socket option])], [], [#include <sys/socket.h>])
# Use c++ in subsequent tests
AC_LANG_PUSH(C++)
AC_CHECK_DECLS([SO_PEERCRED], [AC_DEFINE(ZMQ_HAVE_SO_PEERCRED, 1, [Have SO_PEERCRED socket option])], [], [#include <sys/socket.h>])
AC_CHECK_DECLS([LOCAL_PEERCRED], [AC_DEFINE(ZMQ_HAVE_LOCAL_PEERCRED, 1, [Have LOCAL_PEERCRED socket option])], [], [#include <sys/socket.h>])
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE