[PATCH v4 09/66] selftests/clone3: Drop define _GNU_SOURCE
Edward Liaw
edliaw at google.com
Thu May 9 17:06:26 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/clone3/clone3.c | 2 --
tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c | 2 --
tools/testing/selftests/clone3/clone3_clear_sighand.c | 2 --
tools/testing/selftests/clone3/clone3_selftests.h | 1 -
tools/testing/selftests/clone3/clone3_set_tid.c | 2 --
5 files changed, 9 deletions(-)
diff --git a/tools/testing/selftests/clone3/clone3.c b/tools/testing/selftests/clone3/clone3.c
index e61f07973ce5..ce2c149dab46 100644
--- a/tools/testing/selftests/clone3/clone3.c
+++ b/tools/testing/selftests/clone3/clone3.c
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/* Based on Christian Brauner's clone3() example */
-
-#define _GNU_SOURCE
#include <errno.h>
#include <inttypes.h>
#include <linux/types.h>
diff --git a/tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c b/tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c
index 31b56d625655..bb99ea20f7d5 100644
--- a/tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c
+++ b/tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c
@@ -7,8 +7,6 @@
*/
/* capabilities related code based on selftests/bpf/test_verifier.c */
-
-#define _GNU_SOURCE
#include <errno.h>
#include <linux/types.h>
#include <linux/sched.h>
diff --git a/tools/testing/selftests/clone3/clone3_clear_sighand.c b/tools/testing/selftests/clone3/clone3_clear_sighand.c
index ce0426786828..8ee24da7aea8 100644
--- a/tools/testing/selftests/clone3/clone3_clear_sighand.c
+++ b/tools/testing/selftests/clone3/clone3_clear_sighand.c
@@ -1,6 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
-
-#define _GNU_SOURCE
#include <errno.h>
#include <sched.h>
#include <signal.h>
diff --git a/tools/testing/selftests/clone3/clone3_selftests.h b/tools/testing/selftests/clone3/clone3_selftests.h
index 3d2663fe50ba..172e19d5515f 100644
--- a/tools/testing/selftests/clone3/clone3_selftests.h
+++ b/tools/testing/selftests/clone3/clone3_selftests.h
@@ -3,7 +3,6 @@
#ifndef _CLONE3_SELFTESTS_H
#define _CLONE3_SELFTESTS_H
-#define _GNU_SOURCE
#include <sched.h>
#include <linux/sched.h>
#include <linux/types.h>
diff --git a/tools/testing/selftests/clone3/clone3_set_tid.c b/tools/testing/selftests/clone3/clone3_set_tid.c
index bfb0da2b4fdd..a6df528341bb 100644
--- a/tools/testing/selftests/clone3/clone3_set_tid.c
+++ b/tools/testing/selftests/clone3/clone3_set_tid.c
@@ -5,8 +5,6 @@
* These tests are assuming to be running in the host's
* PID namespace.
*/
-
-#define _GNU_SOURCE
#include <errno.h>
#include <linux/types.h>
#include <linux/sched.h>
--
2.45.0.118.g7fe29c98d7-goog
More information about the linux-riscv
mailing list