Revert "selftests/cgroup: Drop define _GNU_SOURCE"
authorShuah Khan <skhan@linuxfoundation.org>
Fri, 17 May 2024 02:22:37 +0000 (20:22 -0600)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 20 May 2024 15:00:15 +0000 (09:00 -0600)
This reverts commit c1457d9aad5ee2feafcf85aa9a58ab50500159d2.

The framework change to add D_GNU_SOURCE to KHDR_INCLUDES
to Makefile, lib.mk, and kselftest_harness.h is reverted
as it is causing build failures and warnings.

Revert this change as this change depends on the framework
change.

Reported-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/cgroup/cgroup_util.c
tools/testing/selftests/cgroup/test_core.c
tools/testing/selftests/cgroup/test_cpu.c
tools/testing/selftests/cgroup/test_hugetlb_memcg.c
tools/testing/selftests/cgroup/test_kmem.c
tools/testing/selftests/cgroup/test_memcontrol.c
tools/testing/selftests/cgroup/test_zswap.c

index ce16a50..432db92 100644 (file)
@@ -1,4 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 */
+
+#define _GNU_SOURCE
+
 #include <errno.h>
 #include <fcntl.h>
 #include <linux/limits.h>
index de8baad..a5672a9 100644 (file)
@@ -1,4 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
+
+#define _GNU_SOURCE
 #include <linux/limits.h>
 #include <linux/sched.h>
 #include <sys/types.h>
index 5a4a314..dad2ed8 100644 (file)
@@ -1,4 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
+
+#define _GNU_SOURCE
 #include <linux/limits.h>
 #include <sys/sysinfo.h>
 #include <sys/wait.h>
index 80d05d5..856f950 100644 (file)
@@ -1,4 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
+#define _GNU_SOURCE
+
 #include <linux/limits.h>
 #include <sys/mman.h>
 #include <stdio.h>
index 2e453ac..96693d8 100644 (file)
@@ -1,4 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
+#define _GNU_SOURCE
+
 #include <linux/limits.h>
 #include <fcntl.h>
 #include <stdio.h>
index c871630..41ae804 100644 (file)
@@ -1,4 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
+#define _GNU_SOURCE
+
 #include <linux/limits.h>
 #include <linux/oom.h>
 #include <fcntl.h>
index 8418a8d..fa571bf 100644 (file)
@@ -1,4 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
+#define _GNU_SOURCE
+
 #include <linux/limits.h>
 #include <unistd.h>
 #include <stdio.h>