]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3658. [port] linux: Address platform specific compilation issue v9.9.4-P2
authorMark Andrews <marka@isc.org>
Thu, 26 Sep 2013 05:26:43 +0000 (15:26 +1000)
committerMark Andrews <marka@isc.org>
Fri, 20 Dec 2013 00:28:28 +0000 (11:28 +1100)
                        when libcap-devel is installed. [RT #34838]

(cherry picked from commit 7433a204d32673e9f6747172f202272cc5bfe27c)
(cherry picked from commit 9b7d05c900174f958b282429f0c4a112a08b82e2)

CHANGES
bin/named/unix/os.c
configure
configure.in

diff --git a/CHANGES b/CHANGES
index 69c68034580956e41538b2a810d07180d6f55a45..5deb7eb7bf33bd917e909530e7622c30363c46d9 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,9 @@
                        on some platforms.  This could cause INSIST failures
                        when serving NSEC3 signed zones.  [RT #35120]
 
+3658.  [port]          linux: Address platform specific compilation issue
+                       when libcap-devel is installed. [RT #34838]
+
        --- 9.9.4-P1 released ---
 
 3656.  [bug]           Treat an all zero netmask as invalid when generating
index 1a0d4db785926efa720717342879d4079fa4019c..d6c82a764ad8be45e7859f81cb17151a8b9a8471 100644 (file)
@@ -117,12 +117,12 @@ static int dfd[2] = { -1, -1 };
 static isc_boolean_t non_root = ISC_FALSE;
 static isc_boolean_t non_root_caps = ISC_FALSE;
 
-#ifdef HAVE_LINUX_TYPES_H
-#include <linux/types.h>
-#endif
 #ifdef HAVE_SYS_CAPABILITY_H
 #include <sys/capability.h>
 #else
+#ifdef HAVE_LINUX_TYPES_H
+#include <linux/types.h>
+#endif
 /*%
  * We define _LINUX_FS_H to prevent it from being included.  We don't need
  * anything from it, and the files it includes cause warnings with 2.2
index 2a53adfe63bcbd7395206bd652e49ee71daf4aa1..a54c2b4a93ea457592a30842a5160852f2124059 100755 (executable)
--- a/configure
+++ b/configure
 
 done
 
-               for ac_header in linux/capability.h sys/capability.h
+               for ac_header in sys/capability.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_LINUX_TYPES_H
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_capability_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_CAPABILITY_H 1
+_ACEOF
+
+fi
+
+done
+
+               for ac_header in linux/capability.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "linux/capability.h" "ac_cv_header_linux_capability_h" "#ifdef HAVE_LINUX_TYPES_H
                                  #include <linux/types.h>
                                  #endif
 
 "
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+if test "x$ac_cv_header_linux_capability_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_LINUX_CAPABILITY_H 1
 _ACEOF
 
 fi
index 6f4618ca18c839a28be28086b96a4019ac49875c..0750f6f5f2442c4f4465c6903535cf4e43f2424b 100644 (file)
@@ -2549,7 +2549,8 @@ AC_ARG_ENABLE(linux-caps,
 case "$enable_linux_caps" in
        yes|'')
                AC_CHECK_HEADERS(linux/types.h)
-               AC_CHECK_HEADERS([linux/capability.h sys/capability.h], [], [],
+               AC_CHECK_HEADERS([sys/capability.h])
+               AC_CHECK_HEADERS([linux/capability.h], [], [],
                                 [#ifdef HAVE_LINUX_TYPES_H
                                  #include <linux/types.h>
                                  #endif