svn commit: samba r26255 - in branches/SAMBA_4_0/source/lib/replace/system: .

obnox at samba.org obnox at samba.org
Mon Dec 3 16:46:45 GMT 2007


Author: obnox
Date: 2007-12-03 16:46:45 +0000 (Mon, 03 Dec 2007)
New Revision: 26255

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26255

Log:
Work around another broken aspect of sys/capability.h on RHEL5.

This is synced from samba3 v3-2-test/11bcdf780e164659b89:

The /usr/include/sys/capability.h defines _LINUX_TYPES_H
which prevents /usr/include/linux/types.h from being parsed
(when included afterwards). Thus certain types are undefined
that are for instance needed in /usr/include/linux/dqblk_xfs.h.
This breaks the build of lib/sysquotas_xfs.c in Samba3.

This commit adds a configure check and a workaround for this.

Michael



Modified:
   branches/SAMBA_4_0/source/lib/replace/system/capability.h
   branches/SAMBA_4_0/source/lib/replace/system/config.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/system/capability.h
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/system/capability.h	2007-12-03 16:32:28 UTC (rev 26254)
+++ branches/SAMBA_4_0/source/lib/replace/system/capability.h	2007-12-03 16:46:45 UTC (rev 26255)
@@ -33,8 +33,17 @@
 #define BROKEN_REDHAT_7_STATFS_WORKAROUND
 #endif
 
+#if defined(BROKEN_RHEL5_SYS_CAP_HEADER) && !defined(_LINUX_TYPES_H)
+#define BROKEN_RHEL5_SYS_CAP_HEADER_WORKAROUND
+#endif
+
 #include <sys/capability.h>
 
+#ifdef BROKEN_RHEL5_SYS_CAP_HEADER_WORKAROUND
+#undef _LINUX_TYPES_H
+#undef BROKEN_RHEL5_SYS_CAP_HEADER_WORKAROUND
+#endif
+
 #ifdef BROKEN_REDHAT_7_STATFS_WORKAROUND
 #undef _PPC_STATFS_H
 #undef _I386_STATFS_H

Modified: branches/SAMBA_4_0/source/lib/replace/system/config.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/system/config.m4	2007-12-03 16:32:28 UTC (rev 26254)
+++ branches/SAMBA_4_0/source/lib/replace/system/config.m4	2007-12-03 16:46:45 UTC (rev 26255)
@@ -35,6 +35,22 @@
 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
 	AC_DEFINE(BROKEN_REDHAT_7_SYSTEM_HEADERS,1,[Broken RedHat 7.2 system header files])
 fi
+
+AC_CACHE_CHECK([for broken RHEL5 sys/capability.h],samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER,[
+AC_TRY_COMPILE([
+	#ifdef HAVE_SYS_CAPABILITY_H
+	#include <sys/capability.h>
+	#endif
+	#include <linux/types.h>
+	],[
+	__s8 i;
+	],
+	samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no,
+	samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes
+)])
+if test x"$samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER" = x"yes"; then
+	AC_DEFINE(BROKEN_RHEL5_SYS_CAP_HEADER,1,[Broken RHEL5 sys/capability.h])
+fi
 ;;
 esac
 



More information about the samba-cvs mailing list