[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-unstable-322-g11bcdf7
Michael Adam
obnox at samba.org
Thu Nov 15 23:46:44 GMT 2007
The branch, v3-2-test has been updated
via 11bcdf780e164659b89a66e24edc27e89da7619a (commit)
via 4ab3b23a630e822e3fdf1ab4d08330625b0e4fb6 (commit)
from 1ea3ac80146b83c2522b69e7747c823366a2b47d (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 11bcdf780e164659b89a66e24edc27e89da7619a
Author: Michael Adam <obnox at samba.org>
Date: Fri Nov 16 00:45:44 2007 +0100
Fix the build on RHEL5, when libcap-devel is installed.
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.
This commit adds a configure check and a workaround for this.
Michael
commit 4ab3b23a630e822e3fdf1ab4d08330625b0e4fb6
Author: Michael Adam <obnox at samba.org>
Date: Fri Nov 16 00:34:37 2007 +0100
Fix an implicit cast warning.
Michael
-----------------------------------------------------------------------
Summary of changes:
source/configure.in | 12 ++++++++++++
source/lib/replace/system/capability.h | 9 +++++++++
source/smbd/password.c | 2 +-
3 files changed, 22 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/configure.in b/source/configure.in
index be2b262..d37e392 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -3242,6 +3242,18 @@ AC_TRY_COMPILE([
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
diff --git a/source/lib/replace/system/capability.h b/source/lib/replace/system/capability.h
index 4fe7c8d..b314237 100644
--- a/source/lib/replace/system/capability.h
+++ b/source/lib/replace/system/capability.h
@@ -32,8 +32,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 _I386_STATFS_H
#undef BROKEN_REDHAT_7_STATFS_WORKAROUND
diff --git a/source/smbd/password.c b/source/smbd/password.c
index 80b5415..7bba458 100644
--- a/source/smbd/password.c
+++ b/source/smbd/password.c
@@ -684,7 +684,7 @@ static char *validate_group(char *group, DATA_BLOB password,int snum)
}
list_len++;
- member_list = SMB_MALLOC(list_len);
+ member_list = (char *)SMB_MALLOC(list_len);
if (!member_list) {
endgrent();
return NULL;
--
Samba Shared Repository
More information about the samba-cvs
mailing list