summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2020-09-25 10:04:52 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2020-09-25 10:04:52 +0100
commit4f638c0e31240b2fed9aa5035c25dc08e309ae15 (patch)
treeb6b95c494eba1e29dfb60b77f29feb01456ac5a3
parente2e5169f84723e3d8e34b7915f723ebbad3bb140 (diff)
Check if UNIX 03 is needed for CMSG_DATA, for newer Solaris. From Eric N Vanderbefore_lock
Weele.
-rw-r--r--configure.ac24
1 files changed, 22 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index f89c590b..82be9254 100644
--- a/configure.ac
+++ b/configure.ac
@@ -328,8 +328,9 @@ AC_SEARCH_LIBS(inet_ntoa, nsl)
AC_SEARCH_LIBS(socket, socket)
AC_CHECK_LIB(xnet, socket)
-# Check for CMSG_DATA. Some platforms require _XOPEN_SOURCE_EXTENDED (for
-# example see xopen_networking(7) on HP-UX).
+# Check for CMSG_DATA. On some platforms like HP-UX this requires UNIX 95
+# (_XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED) (see xopen_networking(7)). On
+# others, UNIX 03 (_XOPEN_SOURCE 600, see standards(7) on Solaris).
XOPEN_DEFINES=
AC_MSG_CHECKING(for CMSG_DATA)
AC_EGREP_CPP(
@@ -362,6 +363,25 @@ if test "x$found_cmsg_data" = xno; then
AC_MSG_RESULT($found_cmsg_data)
if test "x$found_cmsg_data" = xyes; then
XOPEN_DEFINES="-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED"
+ fi
+fi
+if test "x$found_cmsg_data" = xno; then
+ AC_MSG_CHECKING(if CMSG_DATA needs _XOPEN_SOURCE 600)
+ AC_EGREP_CPP(
+ yes,
+ [
+ #define _XOPEN_SOURCE 600
+ #include <sys/socket.h>
+ #ifdef CMSG_DATA
+ yes
+ #endif
+ ],
+ found_cmsg_data=yes,
+ found_cmsg_data=no
+ )
+ AC_MSG_RESULT($found_cmsg_data)
+ if test "x$found_cmsg_data" = xyes; then
+ XOPEN_DEFINES="-D_XOPEN_SOURCE=600"
else
AC_MSG_ERROR("CMSG_DATA not found")
fi