]> diplodocus.org Git - nmh/blobdiff - sbr/makedir.c
Make generating the ChangeLog work if you're building a distribution from
[nmh] / sbr / makedir.c
index 523feb68ce10ce7c4e763da48c743163f28aac4b..98a5d7f367129aa3d22c2cd9962a7d07cc115534 100644 (file)
@@ -2,8 +2,6 @@
 /*
  * makedir.c -- make a directory
  *
- * $Id$
- *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
  * complete copyright information.
@@ -17,8 +15,6 @@
 #include <errno.h>
 #include <sys/param.h>
 #include <sys/file.h>
-
-extern int errno;
        
 int
 makedir (char *dir)
@@ -89,7 +85,7 @@ makedir (char *dir)
           nested directories like the above code can.
 
           -- Dan Harkless <dan-nmh@dilvish.speed.net> */
-       switch (pid = vfork()) {
+       switch (pid = fork()) {
            case -1: 
                advise ("fork", "unable to");
                return 0;
@@ -98,8 +94,8 @@ makedir (char *dir)
                setgid (getgid ());
                setuid (getuid ());
                
-               execl ("/bin/mkdir", "mkdir", dir, NULL);
-               execl ("/usr/bin/mkdir", "mkdir", dir, NULL);
+               execl ("/bin/mkdir", "mkdir", dir, (void *) NULL);
+               execl ("/usr/bin/mkdir", "mkdir", dir, (void *) NULL);
                fprintf (stderr, "unable to exec ");
                perror ("mkdir");
                _exit (-1);