diff options
author | ewt <devnull@localhost> | 1997-06-03 16:08:23 +0000 |
---|---|---|
committer | ewt <devnull@localhost> | 1997-06-03 16:08:23 +0000 |
commit | d532528178702bdfab21b8e24898f407a126d10c (patch) | |
tree | fcb4319df6a9a2a18933863626ff3dde1934708b /misc | |
parent | 7ba07d0e70ba58d0d79d9a48169a5b479b3bea95 (diff) | |
download | rpm-d532528178702bdfab21b8e24898f407a126d10c.tar.gz rpm-d532528178702bdfab21b8e24898f407a126d10c.tar.bz2 rpm-d532528178702bdfab21b8e24898f407a126d10c.zip |
Fixed horrible brokenness
CVS patchset: 1681
CVS date: 1997/06/03 16:08:23
Diffstat (limited to 'misc')
-rw-r--r-- | misc/getmntent.c | 10 | ||||
-rw-r--r-- | misc/miscfn.h | 11 |
2 files changed, 11 insertions, 10 deletions
diff --git a/misc/getmntent.c b/misc/getmntent.c index 69eb1887b..c1506c6ef 100644 --- a/misc/getmntent.c +++ b/misc/getmntent.c @@ -11,13 +11,13 @@ #define COMMENTCHAR '#' #endif -struct mntent *getmntent(FILE *filep) { - static struct mntent item = { NULL }; +our_mntent *getmntent(FILE *filep) { + static our_mntent item = { NULL }; char buf[1024], * start; char * chptr; - if (item.mnt_dir) { - free(item.mnt_dir); + if (item.our_mntdir) { + free(item.our_mntdir); } while (fgets(buf, sizeof(buf) - 1, filep)) { @@ -49,7 +49,7 @@ struct mntent *getmntent(FILE *filep) { while (!isspace(*chptr) && (*chptr)) chptr++; *chptr = '\0'; - item.mnt_dir = strdup(start); + item.our_mntdir = strdup(start); return &item; #endif } diff --git a/misc/miscfn.h b/misc/miscfn.h index adabc7763..b94332118 100644 --- a/misc/miscfn.h +++ b/misc/miscfn.h @@ -65,17 +65,18 @@ extern void *myrealloc(void *, size_t); #if HAVE_MNTENT_H || !(HAVE_GETMNTENT) # if HAVE_MNTENT_H # include <mntent.h> +# define our_mntent struct mntent +# define our_mntdir mnt_dir # else #include <stdio.h> - struct mntent { - char * mnt_dir; + struct our_mntent { + char * our_mntdir; }; - struct mntent *getmntent(FILE *filep); + struct our_mntent *getmntent(FILE *filep); +# define our_mntent struct our_mntent # endif # define GETMNTENT_ONE 1 # define GETMNTENT_TWO 0 -# define our_mntent struct mntent -# define our_mntdir mnt_dir #elif HAVE_SYS_MNTTAB_H # include <stdio.h> # include <sys/mnttab.h> |