[PATCH 3/9] tests: Add check for presence of HAVE_LINUX_DM_IOCTL_H macro definition to ioctl_dm test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 tests/ioctl_dm.c |   21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/tests/ioctl_dm.c b/tests/ioctl_dm.c
index 0a3bbf4..5f2689c 100644
--- a/tests/ioctl_dm.c
+++ b/tests/ioctl_dm.c
@@ -1,10 +1,13 @@
 #include "tests.h"
-#include <inttypes.h>
-#include <stdio.h>
-#include <stddef.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <linux/dm-ioctl.h>
+
+#ifdef HAVE_LINUX_DM_IOCTL_H
+
+# include <inttypes.h>
+# include <stdio.h>
+# include <stddef.h>
+# include <string.h>
+# include <sys/ioctl.h>
+# include <linux/dm-ioctl.h>
 
 static struct s {
 	struct dm_ioctl ioc;
@@ -103,3 +106,9 @@ main(void)
 	puts("+++ exited with 0 +++");
 	return 0;
 }
+
+#else /* !HAVE_LINUX_DM_IOCTL_H */
+
+SKIP_MAIN_UNDEFINED("HAVE_LINUX_DM_IOCTL_H")
+
+#endif /* HAVE_LINUX_DM_IOCTL_H */
-- 
1.7.10.4

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux