config.h.in | 3 +++
configure | 3 ++-
configure.ac | 2 +-
ldap/servers/slapd/daemon.c | 12 +++++++-----
ldap/servers/slapd/pw.c | 3 +++
5 files changed, 16 insertions(+), 7 deletions(-)
New commits:
commit 20e5c59fd89af35715bfc5ddd2d0c38555bbb105
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Fri Sep 14 09:50:46 2012 -0600
Ticket #463 - different parameters of getmntent in Solaris
https://fedorahosted.org/389/ticket/463
Reviewed by: rmeggins
Fixed by: cgrzemba
Branch: master
Fix Description: move stdio.h to before the include of mnttab.h
on Solaris the argument to getmntent is the address of the structure
to fill in
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
diff --git a/ldap/servers/slapd/daemon.c b/ldap/servers/slapd/daemon.c
index 0abc3b6..0d3d81f 100644
--- a/ldap/servers/slapd/daemon.c
+++ b/ldap/servers/slapd/daemon.c
@@ -82,6 +82,7 @@
#endif /* NEED_FILIO */
#endif /* !defined( _WIN32 ) */
/* for some reason, linux tty stuff defines CTIME */
+#include <stdio.h>
#ifdef LINUX
#undef CTIME
#include <sys/statfs.h>
@@ -94,7 +95,6 @@
#include "snmp_collator.h"
#include <private/pprio.h>
#include <ssl.h>
-#include <stdio.h>
#include "fe.h"
#if defined(ENABLE_LDAPI)
@@ -484,7 +484,7 @@ time_thread(void *nothing)
char *
disk_mon_get_mount_point(char *dir)
{
- struct mnttab *mnt;
+ struct mnttab mnt;
struct stat s;
dev_t dev_id;
FILE *fp;
@@ -497,12 +497,12 @@ disk_mon_get_mount_point(char *dir)
dev_id = s.st_dev;
- while((mnt = getmntent(fp))){
- if (stat(mnt->mnt_mountp, &s) != 0) {
+ while((0 = getmntent(fp, &mnt))){
+ if (stat(mnt.mnt_mountp, &s) != 0) {
continue;
}
if (s.st_dev == dev_id) {
- return (slapi_ch_strdup(mnt->mnt_mountp));
+ return (slapi_ch_strdup(mnt.mnt_mountp));
}
}
commit 533cc7a464734aa687d6071c44d6eae5f36af66b
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Fri Sep 14 09:24:52 2012 -0600
Ticket #462 - add test for include file mntent.h
https://fedorahosted.org/389/ticket/462
Reviewed by: rmeggins
Fixed by: cgrzemba
Branch: master
Fix Description: Add mntent.h to AC_CHECK_HEADERS - do not include
mntent.h unless HAVE_MNTENT_H is defined.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
diff --git a/config.h.in b/config.h.in
index 36253d7..a67236e 100644
--- a/config.h.in
+++ b/config.h.in
@@ -163,6 +163,9 @@
/* Define to 1 if you have a working `mmap' system call. */
#undef HAVE_MMAP
+/* Define to 1 if you have the <mntent.h> header file. */
+#undef HAVE_MNTENT_H
+
/* Define to 1 if you have the `munmap' function. */
#undef HAVE_MUNMAP
diff --git a/configure b/configure
index cca7f2e..2793602 100755
--- a/configure
+++ b/configure
@@ -16362,7 +16362,8 @@ fi
-for ac_header in arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h
strings.h sys/file.h sys/socket.h sys/time.h unistd.h inttypes.h
+
+for ac_header in arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h
strings.h sys/file.h sys/socket.h sys/time.h unistd.h inttypes.h mntent.h
do
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; };
then
diff --git a/configure.ac b/configure.ac
index c5cece2..85eb3d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,7 +34,7 @@ AC_PROG_LIBTOOL
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h
strings.h sys/file.h sys/socket.h sys/time.h unistd.h inttypes.h])
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h
strings.h sys/file.h sys/socket.h sys/time.h unistd.h inttypes.h mntent.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STAT
diff --git a/ldap/servers/slapd/daemon.c b/ldap/servers/slapd/daemon.c
index 597e131..0abc3b6 100644
--- a/ldap/servers/slapd/daemon.c
+++ b/ldap/servers/slapd/daemon.c
@@ -59,8 +59,10 @@
#include <sys/time.h>
#include <sys/wait.h>
#include <pthread.h>
+#if defined(HAVE_MNTENT_H)
#include <mntent.h>
#endif
+#endif
#include <time.h>
#include <signal.h>
#if defined(IRIX6_2) || defined(IRIX6_3)
commit f5bd0ed47523b39aedb6bcc1f9c0754371159a77
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Fri Sep 14 09:20:18 2012 -0600
Ticket #461 - fix build problem with mozldap c sdk
https://fedorahosted.org/389/ticket/461
Reviewed by: rmeggins
Fixed by: cgrzemba
Branch: master
Fix Description: mozldap does not define LDAP_MOD_OP so define it
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c
index bfd48b1..4736e82 100644
--- a/ldap/servers/slapd/pw.c
+++ b/ldap/servers/slapd/pw.c
@@ -61,6 +61,9 @@
#if defined( _WIN32 )
#undef LDAPDebug
#endif /* _WIN32 */
+#if defined( USE_MOZLDAP )
+#define LDAP_MOD_OP (0x0007)
+#endif /* USE_MOZLDAP */
#include "slap.h"