]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/shell-backends/passwd-shell.c
We shouldn't detach a thread that we want to join with...
[openldap] / servers / slapd / shell-backends / passwd-shell.c
index 2d7df71c74b31030c164bb4155478b76a6b141b4..89d2fd73d66ad91f0a66a8b0fccb8aa209d5371b 100644 (file)
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <pwd.h>
 
 #include <ac/string.h>
+#include <ac/unistd.h>
+
+#include <pwd.h>
 
 #include <lber.h>
 #include <ldap.h>
@@ -34,12 +36,11 @@ static struct ldentry *pw2entry LDAP_P(( struct ldop *op, struct passwd *pw ));
 static char    tmpbuf[ MAXLINELEN * 2 ];
 
 
+int
 main( int argc, char **argv )
 {
     int                        c, errflg;
     struct ldop                op;
-    extern int         optind;
-    extern char                *optarg;
 
     if (( progname = strrchr( argv[ 0 ], '/' )) == NULL ) {
        progname = estrdup( argv[ 0 ] );