]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Build fixes for Solaris.
authorShane Kerr <shane@isc.org>
Tue, 26 Jun 2007 09:56:52 +0000 (09:56 +0000)
committerShane Kerr <shane@isc.org>
Tue, 26 Jun 2007 09:56:52 +0000 (09:56 +0000)
See RT ticket #16966 for more.

RELNOTES
configure.ac

index 0684cfb85f84e1b177740f56f6afe061b975b7d1..d018275f2a0b325b9beb0f403fe367a949d9dd60 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -54,6 +54,8 @@ suggested fixes to <dhcp-users@isc.org>.
 
                        Changes since 4.0.0a1
 
+- Autoconf now supplies proper flags for Solaris DHCPv6 builds.
+
 - Fix for parsing error on some IPv6 addresses.
 
 - Invalid CIDR representation for IPv6 subnets or ranges now checked
index 1c6f25f44b84d3bc7b8890c448ac46a06909bc56..37a40b71bf4198e0ce4eb73fd20a4de7134eba99 100644 (file)
@@ -163,6 +163,29 @@ AC_CHECK_SIZEOF(struct iaddr *, , [
 #include <stdio.h>
 ])
 
+# Solaris does not have the msg_control or msg_controlen members in 
+# in the msghdr structure unless you define:
+#
+#   _XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED, and __EXTENSIONS__
+# 
+# See the "standards" man page for details.
+# 
+# We check for the msg_control member, and if it is not found, we check
+# again with the appropriate defines added to the CFLAGS. (In order to
+# do this we have to remove the check from the cache, which is what the
+# "unset" is for.)
+AC_CHECK_MEMBER(struct msghdr.msg_control,,
+       [CFLAGS="$CFLAGS -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
+        CFLAGS="$CFLAGS -D__EXTENSIONS__"
+        unset ac_cv_member_struct_msghdr_msg_control
+        AC_CHECK_MEMBER(struct msghdr.msg_control,,
+               [AC_MSG_ERROR([Missing msg_control member in 
+                              msg_control structure.])],
+               [#include <sys/types.h>
+                #include <sys/socket.h>])],
+       [#include <sys/types.h>
+        #include <sys/socket.h>])
+
 AC_OUTPUT([
   Makefile
   client/Makefile