Fix build error on non-GNU environment
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Mon, 1 Jun 2015 12:32:37 +0000 (21:32 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Mon, 1 Jun 2015 12:44:05 +0000 (21:44 +0900)
'#include <mntent.h>' needs to be inside '#ifdef CONFIG_GETMNTENT'
and that was probably the intention of the commit aae599ba.
e.g. BSDs are likely to hit following compile error.

--
lib/mountcheck.c:3:20: fatal error: mntent.h: No such file or directory
compilation terminated.
Makefile:275: recipe for target 'lib/mountcheck.o' failed
gmake: *** [lib/mountcheck.o] Error 1

lib/mountcheck.c

index dea27462e121befd46793c0b057948912bacc36a..bb01f69f46b1ed579fbd36bb6d4a4cf6f8f4f374 100644 (file)
@@ -1,8 +1,8 @@
 #include <stdio.h>
 #include <string.h>
-#include <mntent.h>
 
 #ifdef CONFIG_GETMNTENT
+#include <mntent.h>
 
 #define MTAB   "/etc/mtab"