[PATCH v5 29/68] selftests/memfd: Drop define _GNU_SOURCE
Edward Liaw
edliaw at google.com
Tue May 21 17:57:15 PDT 2024
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent
redefinition warnings.
Reviewed-by: John Hubbard <jhubbard at nvidia.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum at collabora.com>
Signed-off-by: Edward Liaw <edliaw at google.com>
---
tools/testing/selftests/memfd/common.c | 1 -
tools/testing/selftests/memfd/fuse_test.c | 2 --
tools/testing/selftests/memfd/memfd_test.c | 1 -
3 files changed, 4 deletions(-)
diff --git a/tools/testing/selftests/memfd/common.c b/tools/testing/selftests/memfd/common.c
index 8eb3d75f6e60..879d4f4c66fa 100644
--- a/tools/testing/selftests/memfd/common.c
+++ b/tools/testing/selftests/memfd/common.c
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-#define _GNU_SOURCE
#define __EXPORTED_HEADERS__
#include <stdio.h>
diff --git a/tools/testing/selftests/memfd/fuse_test.c b/tools/testing/selftests/memfd/fuse_test.c
index dbc171a3806d..e35c6909f0bb 100644
--- a/tools/testing/selftests/memfd/fuse_test.c
+++ b/tools/testing/selftests/memfd/fuse_test.c
@@ -12,8 +12,6 @@
* the read() syscall with our memory-mapped memfd object as receive buffer to
* force the kernel to write into our memfd object.
*/
-
-#define _GNU_SOURCE
#define __EXPORTED_HEADERS__
#include <errno.h>
diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memfd/memfd_test.c
index 95af2d78fd31..ee019b57bb98 100644
--- a/tools/testing/selftests/memfd/memfd_test.c
+++ b/tools/testing/selftests/memfd/memfd_test.c
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-#define _GNU_SOURCE
#define __EXPORTED_HEADERS__
#include <errno.h>
--
2.45.1.288.g0e0cd299f1-goog
More information about the linux-riscv
mailing list