replace: Try to fix broken sys/capabilites.h on Linux.
authorAndreas Schneider <asn@samba.org>
Wed, 2 Feb 2011 09:40:06 +0000 (10:40 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 2 Feb 2011 10:57:04 +0000 (11:57 +0100)
As this is more or less a broken header we need to include linux/types.h
before sys/capabilities.h to avoid redefinitions.

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Feb  2 11:57:04 CET 2011 on sn-devel-104

lib/replace/system/capability.h
lib/replace/system/config.m4
lib/replace/wscript

index a7b78f02756e94cba8983c0d57b949fe0c490999..832bc29152a84ac60241dd459078b5836a4bb7ca 100644 (file)
 #define BROKEN_RHEL5_SYS_CAP_HEADER_WORKAROUND
 #endif
 
+#ifdef HAVE_LINUX_TYPES_H
+#include <linux/types.h>
+#endif
+
 #include <sys/capability.h>
 
 #ifdef BROKEN_RHEL5_SYS_CAP_HEADER_WORKAROUND
index 04364bc3a1d66715df246380e01353ecbe7a3f85..71d3d53c3d2dcc8d164fb8864e3d35a8a70dd3d9 100644 (file)
@@ -25,6 +25,7 @@ fi
 AC_HEADER_SYS_WAIT
 
 # capability
+AC_CHECK_HEADERS(linux/types.h)
 AC_CHECK_HEADERS(sys/capability.h)
 
 case "$host_os" in
index c6c4fe1fdf808b1ec6cd1549c1d83d9394383cd0..450e474f1aebbabec2b64a097ecde62632ae2c7d 100644 (file)
@@ -40,7 +40,7 @@ def configure(conf):
     conf.CHECK_HEADERS('crypt.h locale.h acl/libacl.h compat.h')
     conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
     conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
-    conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h')
+    conf.CHECK_HEADERS('libaio.h linux/types.h locale.h ndir.h pwd.h')
     conf.CHECK_HEADERS('shadow.h sys/acl.h')
     conf.CHECK_HEADERS('sys/attributes.h sys/capability.h sys/dir.h sys/epoll.h')
     conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h')