]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] portability fix
authorEvan Hunt <each@isc.org>
Thu, 11 Jul 2013 03:44:58 +0000 (20:44 -0700)
committerEvan Hunt <each@isc.org>
Thu, 11 Jul 2013 03:44:58 +0000 (20:44 -0700)
3614. [port] Check for <linux/types.h>. [RT #34162]

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

diff --git a/CHANGES b/CHANGES
index e1a70b04ad81fac30da09ee6e05e397c11fead3d..6b00cdd16e8cfedef0ebbd87c5313f0b30853e9f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+3614.  [port]          Check for <linux/types.h>. [RT #34162]
+
 3613.  [bug]           named could crash when deleting inline-signing
                        zones with "rndc delzone". [RT #34066]
 
index 4f5f55c3eedb55c1c3c89de3f0ac76bf29c84f94..24f0c307c1e79a6ad0fda2c22ec77d0321596b54 100644 (file)
@@ -117,6 +117,9 @@ 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
index d2e8478b34db5fb1aad9a2f7ad172fd47c47278c..89aa492ffed47993642b144c610f035b13deac5d 100644 (file)
@@ -284,6 +284,9 @@ int sigwait(const unsigned int *set, int *sig);
 /* Define to 1 if you have the <linux/capability.h> header file. */
 #undef HAVE_LINUX_CAPABILITY_H
 
+/* Define to 1 if you have the <linux/types.h> header file. */
+#undef HAVE_LINUX_TYPES_H
+
 /* Define to 1 if you have the <locale.h> header file. */
 #undef HAVE_LOCALE_H
 
index 47806e6aa394d99dedfffb389fb921743ce8a620..2c9c8e2534c9d8eb82e501a58bec9e9b8a9b36a2 100755 (executable)
--- a/configure
+++ b/configure
 
 case "$enable_linux_caps" in
        yes|'')
-               for ac_header in linux/capability.h sys/capability.h
+               for ac_header in linux/types.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "linux/types.h" "ac_cv_header_linux_types_h" "$ac_includes_default"
+if test "x$ac_cv_header_linux_types_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LINUX_TYPES_H 1
+_ACEOF
+
+fi
+
+done
+
+                for ac_header in linux/capability.h sys/capability.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_LINUX_TYPES_H
+                                  #include <linux/types.h>
+                                  #endif
+
+"
 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
index 5ddbd4c95388614eee8bba9dd3f5466ca0c4e8b3..3509908aa8ad488f02edadd469d101f1f2addfaf 100644 (file)
@@ -2618,7 +2618,12 @@ AC_ARG_ENABLE(linux-caps,
        [  --disable-linux-caps   disable linux capabilities])
 case "$enable_linux_caps" in
        yes|'')
-               AC_CHECK_HEADERS(linux/capability.h sys/capability.h)
+               AC_CHECK_HEADERS(linux/types.h)
+               AC_CHECK_HEADERS([linux/capability.h sys/capability.h], [], [],
+                                [#ifdef HAVE_LINUX_TYPES_H
+                                 #include <linux/types.h>
+                                 #endif
+                                ])
                AC_CHECK_LIB(cap, cap_set_proc)
                ;;
        no)