Skip to content

Commit

Permalink
Fixed FreeBSD compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
megastep committed Apr 13, 2012
1 parent c1f28d1 commit 683cc14
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 ){
Expand Down

0 comments on commit 683cc14

Please sign in to comment.