]> git.sur5r.net Git - openldap/blobdiff - servers/ldapd/main.c
Fix idl_firstid to return NOID when !(nids > 1) instead of when (nids == 1)
[openldap] / servers / ldapd / main.c
index f4e179a5ff94c047d5996a89ccc3f826dcb32dca..85f9b5d71f46cf53c34b1557c7a4a673a909ef4f 100644 (file)
@@ -117,8 +117,6 @@ main( int argc, char **argv )
 #ifdef LDAP_PROCTITLE
        char                    title[80];
 #endif
-       extern char             *optarg;
-       extern int              optind;
 
 #ifdef VMS
        /* Pick up socket from inetd-type server on VMS */
@@ -655,10 +653,10 @@ wait4child( int sig )
        Debug( LDAP_DEBUG_TRACE, "parent: catching child status\n", 0, 0, 0 );
 
 #ifdef HAVE_WAITPID
-       while( waitpid( (pid_t) -1, NULL, WAIT_FLAGS ) > 0 )
+       while( waitpid( (pid_t) -1, (int *) NULL, WAIT_FLAGS ) > 0 )
                ;       /* NULL */
 #else
-       while ( wait3( &status, WAIT_FLAGS, 0 ) > 0 )
+       while ( wait4( (pid_t) -1, &status, WAIT_FLAGS, 0 ) > 0 )
                ;       /* NULL */
 #endif