* support --enable-sulogin-emergency-mount on Linux only
* don't include unnecessary linux/magic.h
* don't include linux/fs.h, sys/mount.h should be enough, otherwise
define a fallback for MS_RELATIME
Reported-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
)
AS_IF([test "x$enable_sulogin_emergency_mount" = xyes], [
+ AS_IF([test "x$linux_os" = xyes], [ ],
+ [AC_MSG_ERROR([--enable-sulogin-emergency-mount selected for non-linux system])])
AC_DEFINE([USE_SULOGIN_EMERGENCY_MOUNT], [1],
[Should sulogin use an emergency mount of /dev and /proc?])
])
#include <fcntl.h>
#include <unistd.h>
-#ifdef USE_SULOGIN_EMERGENCY_MOUNT
+#if defined(USE_SULOGIN_EMERGENCY_MOUNT)
# include <sys/mount.h>
-# include <linux/fs.h>
-# include <linux/magic.h>
+# ifndef MS_RELATIME
+# define MS_RELATIME (1<<21)
+# endif
# ifndef MNT_DETACH
# define MNT_DETACH 2
# endif