Permalink
Browse files

Fixed FreeBSD compilation

  • Loading branch information...
megastep committed Apr 13, 2012
1 parent c1f28d1 commit 683cc14196a46ede459dd0f68438592a522ca712
Showing with 5 additions and 1 deletion.
  1. +5 −1 detect.c
View
@@ -89,12 +89,16 @@
#define MOUNTS_FILE MNT_MNTTAB
#elif defined(MOUNTED)
#define MOUNTS_FILE MOUNTED
+#elif defined(__FreeBSD__)
+#define MOUNTS_FILE ""
#else
#define MOUNTS_FILE _PATH_MOUNTED
#endif
#ifdef MNTTAB
#define SETUP_FSTAB MNTTAB
+#elif defined(__FreeBSD__)
+#define SETUP_FSTAB ""
#else
#define SETUP_FSTAB _PATH_MNTTAB
#endif
@@ -397,7 +401,7 @@ void unmount_filesystems(void)
}
fclose(mountfp);
}
-#else
+#elif !defined(__FreeBSD__) // FIXME
mountfp = setmntent( mtab, "r" );
if( mountfp != NULL ) {
while( (mntent = getmntent( mountfp )) != NULL ){

0 comments on commit 683cc14

Please sign in to comment.