]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: include <sys/mount.h> only on Linux
authorPino Toscano <toscano.pino@tiscali.it>
Sun, 7 Jul 2024 07:08:06 +0000 (09:08 +0200)
committerPino Toscano <toscano.pino@tiscali.it>
Sun, 7 Jul 2024 07:08:06 +0000 (09:08 +0200)
Include <sys/mount.h> only on Linux; it is used for fsopen(), which is
available only on Linux.

Signed-off-by: Pino Toscano <toscano.pino@tiscali.it>
tests/helpers/test_sysinfo.c

index 058afc24f9c76093230cdd2a344be7612c9ace2a..362466a6ac780e3edf15cd8b30581c3727b477a0 100644 (file)
@@ -27,7 +27,9 @@
 #include <errno.h>
 #include <time.h>
 #include <sys/ioctl.h>
-#include <sys/mount.h>
+#ifdef __linux__
+# include <sys/mount.h>
+#endif
 
 #include "mount-api-utils.h"