]> granicus.if.org Git - strace/commitdiff
tests/file_ioctl.c: fix build on systems without <linux/fiemap.h>
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 24 May 2016 01:29:38 +0000 (01:29 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 24 May 2016 14:52:27 +0000 (14:52 +0000)
* tests/file_ioctl.c: Include "tests.h" first.
Skip the test if [!HAVE_LINUX_FIEMAP_H].

tests/file_ioctl.c

index 3264b90356a8e2ed7a9847c70b63d8943263623b..e8950dfa82705295793be187249a52756091dfc9 100644 (file)
@@ -1,11 +1,13 @@
-#include <stdio.h>
-#include <sys/ioctl.h>
-#include <linux/fiemap.h>
-#include <linux/fs.h>
 #include "tests.h"
-#include "xlat.h"
 
-#include "xlat/fiemap_flags.h"
+#ifdef HAVE_LINUX_FIEMAP_H
+
+# include <stdio.h>
+# include <sys/ioctl.h>
+# include <linux/fiemap.h>
+# include <linux/fs.h>
+# include "xlat.h"
+# include "xlat/fiemap_flags.h"
 
 static void
 test_fiemap(void)
@@ -31,3 +33,9 @@ main(int argc, char *argv[])
 
        return 0;
 }
+
+#else
+
+SKIP_MAIN_UNDEFINED("HAVE_LINUX_FIEMAP_H")
+
+#endif