summaryrefslogtreecommitdiff
path: root/Utility/libmounts.h
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-19 21:19:29 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-07-19 21:19:29 -0400
commit4bcc92abd72e060e073eaf0a9d988ae3a015d39c (patch)
treec3cb107b346ac8ed313675376be321f706193285 /Utility/libmounts.h
parentf768cddf3a7048334f76fff1a2c895b33fea18af (diff)
now working on OSX
While this seems to work fine when used in a simple program, when I load it in ghci, it segfaults about half the time. Don't know why, and seems ghci specific, but if I get reports of crashes, I'll need to look into that.
Diffstat (limited to 'Utility/libmounts.h')
-rw-r--r--Utility/libmounts.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/Utility/libmounts.h b/Utility/libmounts.h
index 12f5564b5..b65978629 100644
--- a/Utility/libmounts.h
+++ b/Utility/libmounts.h
@@ -1,20 +1,9 @@
/* Include appropriate headers for the OS, and define what will be used. */
-#if defined(__APPLE__)
+#if defined (__FreeBSD__) || defined (__APPLE__)
# include <sys/param.h>
# include <sys/ucred.h>
# include <sys/mount.h>
-/* In newer OSX versions, statfs64 is deprecated, in favor of statfs,
- * which is 64 bit only with a build option -- but statfs64 still works,
- * and this keeps older OSX also supported. */
-# define GETMNTINFOCALL getmntinfo64
-# define MNTINFOSTRUCT statfs64
-#else
-#if defined (__FreeBSD__)
-# include <sys/param.h>
-# include <sys/ucred.h>
-# include <sys/mount.h>
-# define GETMNTINFOCALL getmntinfo64
-# define MNTINFOSTRUCT statfs64
+# define GETMNTINFO
#else
#if defined (__linux__) || defined (__FreeBSD_kernel__)
/* Linux or Debian kFreeBSD */
@@ -25,7 +14,6 @@
# define UNKNOWN
#endif
#endif
-#endif
#include <stdio.h>