#463 different parameters of getmntent in Solaris
Closed: Fixed None Opened 7 years ago by cgrzemba.

Solaris has different parameters for getmntent. For include of mnttab.h have to include stdio.h before.

patch for daemon.c:

--- a/ldap/servers/slapd/daemon.c
+++ b/ldap/servers/slapd/daemon.c
@@ -80,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>
@@ -92,7 +95,6 @@
 #include "snmp_collator.h"
 #include <private/pprio.h>
 #include <ssl.h>
-#include <stdio.h>
 #include "fe.h"

 #if defined(ENABLE_LDAPI)
@@ -495,7 +497,7 @@ disk_mon_get_mount_point(char *dir)

     dev_id = s.st_dev;

-    while((mnt = getmntent(fp))){
+    while(0 == getmntent(fp,mnt)){
         if (stat(mnt->mnt_mountp, &s) != 0) {
             continue;
         }

To ssh://git.fedorahosted.org/git/389/ds.git
82ae04c..20e5c59 master -> master
commit changeset:20e5c59/389-ds-base
Author: Rich Megginson rmeggins@redhat.com
Date: Fri Sep 14 09:50:46 2012 -0600

Metadata Update from @rmeggins:
- Issue assigned to rmeggins
- Issue set to the milestone: 1.3.0.a1

3 years ago

Login to comment on this ticket.

Metadata