From 729aac4d7afb44c7c058c32d0fbc4956e029beab Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 5 Jan 2010 14:37:47 +0200 Subject: [PATCH] Shove the mount entry include voodoo where sun doesn't ... fs.c --- lib/fs.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ system.h | 51 --------------------------------------------------- 2 files changed, 51 insertions(+), 51 deletions(-) diff --git a/lib/fs.c b/lib/fs.c index e16a929..f998525 100644 --- a/lib/fs.c +++ b/lib/fs.c @@ -8,6 +8,57 @@ #include /* for rpmGetPath */ #include +#if HAVE_GETMNTINFO || HAVE_GETMNTINFO_R || HAVE_MNTCTL +# define GETMNTENT_ONE 0 +# define GETMNTENT_TWO 0 +# if HAVE_SYS_MNTCTL_H +# include +# endif +# if HAVE_SYS_VMOUNT_H +# include +# endif +# if HAVE_SYS_MOUNT_H +# include +# endif +#elif HAVE_MNTENT_H || !(HAVE_GETMNTENT) || HAVE_STRUCT_MNTTAB +# if HAVE_MNTENT_H +# include +# include +# define our_mntent struct mntent +# define our_mntdir mnt_dir +# elif HAVE_STRUCT_MNTTAB +# include +# include + struct our_mntent { + char * our_mntdir; + }; + struct our_mntent *getmntent(FILE *filep); +# define our_mntent struct our_mntent +# else +# include + struct our_mntent { + char * our_mntdir; + }; + struct our_mntent *getmntent(FILE *filep); +# define our_mntent struct our_mntent +# endif +# define GETMNTENT_ONE 1 +# define GETMNTENT_TWO 0 +#elif HAVE_SYS_MNTTAB_H +# include +# include +# define GETMNTENT_ONE 0 +# define GETMNTENT_TWO 1 +# define our_mntent struct mnttab +# define our_mntdir mnt_mountp +#else /* if !HAVE_MNTCTL */ +# error Neither mntent.h, mnttab.h, or mntctl() exists. I cannot build on this system. +#endif + +#ifndef MOUNTED +#define MOUNTED "/etc/mnttab" +#endif + #include "debug.h" diff --git a/system.h b/system.h index 4d7a7d3..6d84f0c 100644 --- a/system.h +++ b/system.h @@ -183,55 +183,4 @@ extern const char *__progname; #include #endif -#if HAVE_GETMNTINFO || HAVE_GETMNTINFO_R || HAVE_MNTCTL -# define GETMNTENT_ONE 0 -# define GETMNTENT_TWO 0 -# if HAVE_SYS_MNTCTL_H -# include -# endif -# if HAVE_SYS_VMOUNT_H -# include -# endif -# if HAVE_SYS_MOUNT_H -# include -# endif -#elif HAVE_MNTENT_H || !(HAVE_GETMNTENT) || HAVE_STRUCT_MNTTAB -# if HAVE_MNTENT_H -# include -# include -# define our_mntent struct mntent -# define our_mntdir mnt_dir -# elif HAVE_STRUCT_MNTTAB -# include -# include - struct our_mntent { - char * our_mntdir; - }; - struct our_mntent *getmntent(FILE *filep); -# define our_mntent struct our_mntent -# else -# include - struct our_mntent { - char * our_mntdir; - }; - struct our_mntent *getmntent(FILE *filep); -# define our_mntent struct our_mntent -# endif -# define GETMNTENT_ONE 1 -# define GETMNTENT_TWO 0 -#elif HAVE_SYS_MNTTAB_H -# include -# include -# define GETMNTENT_ONE 0 -# define GETMNTENT_TWO 1 -# define our_mntent struct mnttab -# define our_mntdir mnt_mountp -#else /* if !HAVE_MNTCTL */ -# error Neither mntent.h, mnttab.h, or mntctl() exists. I cannot build on this system. -#endif - -#ifndef MOUNTED -#define MOUNTED "/etc/mnttab" -#endif - #endif /* H_SYSTEM */ -- 2.7.4