summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorewt <devnull@localhost>1997-06-03 16:08:23 +0000
committerewt <devnull@localhost>1997-06-03 16:08:23 +0000
commitd532528178702bdfab21b8e24898f407a126d10c (patch)
treefcb4319df6a9a2a18933863626ff3dde1934708b /misc
parent7ba07d0e70ba58d0d79d9a48169a5b479b3bea95 (diff)
downloadrpm-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.c10
-rw-r--r--misc/miscfn.h11
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>