[LTP] [PATCH v2 2/3] fsstress/global.h: Use _GNU_SOURCE
Petr Vorel
pvorel@suse.cz
Wed Jun 28 15:07:41 CEST 2023
O_DIRECT definitions differ a lot depending on architecture,
therefore _GNU_SOURCE (which loads it) instead of fallback O_DIRECT
definition.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/kernel/fs/fsstress/global.h | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/testcases/kernel/fs/fsstress/global.h b/testcases/kernel/fs/fsstress/global.h
index 4ec382426..584af025d 100644
--- a/testcases/kernel/fs/fsstress/global.h
+++ b/testcases/kernel/fs/fsstress/global.h
@@ -33,7 +33,7 @@
#ifndef GLOBAL_H
#define GLOBAL_H
-/* xfs-specific includes */
+#define _GNU_SOURCE
#if defined(NO_XFS)
# include "xfscompat.h"
@@ -42,8 +42,6 @@
# include <attr/attributes.h>
#endif
-/* libc includes */
-
#include <sys/stat.h>
#include <sys/statvfs.h>
#include <sys/time.h>
@@ -59,8 +57,4 @@
#include <stdio.h>
#include <unistd.h>
-#ifndef O_DIRECT
-#define O_DIRECT 040000
-#endif
-
#endif
--
2.40.1
More information about the ltp
mailing list