Tried to get everything working for SCO.
authorewt <devnull@localhost>
Fri, 27 Jun 1997 21:55:49 +0000 (21:55 +0000)
committerewt <devnull@localhost>
Fri, 27 Jun 1997 21:55:49 +0000 (21:55 +0000)
CVS patchset: 1719
CVS date: 1997/06/27 21:55:49

misc/getmntent.c
misc/miscfn.h

index d2455a2..6b0092e 100644 (file)
 #if HAVE_STRUCT_MNTTAB 
 our_mntent * getmntent(FILE *filep) {
     static struct mnttab entry;
-    static our_mntent item = { entry.mt_filsys };
+    static our_mntent item;
 
     if (!fread(&entry, sizeof(entry), 1, filep)) return NULL;
+    item.our_mntdir = entry.mt_filsys;
 
     return &item;
 }
index 791ae50..6a756e6 100644 (file)
@@ -67,10 +67,17 @@ extern void *myrealloc(void *, size_t);
 # define GETMNTENT_TWO 0
 # include <sys/mount.h>
 #elif HAVE_MNTENT_H || !(HAVE_GETMNTENT) || HAVE_STRUCT_MNTTAB
-# if HAVE_MNTENT_H || HAVE_STRUCT_MNTTAB
+# if HAVE_MNTENT_H
 #  include <mntent.h>
 #  define our_mntent struct mntent
 #  define our_mntdir mnt_dir
+# elif HAVE_STRUCT_MNTTAB
+   #include <stdio.h>
+   #include <mnttab.h>
+   struct our_mntent {
+       char * our_mntdir;
+   };
+   struct our_mntent *getmntent(FILE *filep);
 # else
    #include <stdio.h>
    struct our_mntent {