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 ce16a50ecff87e49b87208d6fc84c86e9e4b0139..432db923bced0c522138e8423c19297a2317ad5c 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 de8baad460222de738bac58259db5afcf5670630..a5672a91d273ced50a1582297e9711ac0012fa2f 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 5a4a314f6af7e8704d755deb9f5df10153758bcd..dad2ed82f3ef7c0996d79333f72384941ee76c70 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 80d05d50a42db30a8eb39a42388f576f5ae7f516..856f9508ea562e08bb6dc9d1ca6cb6f3be717e31 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 2e453ac50c0d674ff65a84748c211db347dd9ff4..96693d8772be244874545f6e33726d7561e21aea 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 c871630d62a3aef2e8edfb2b106f2f6184f1e47f..41ae8047b889579e751129578be04b7c42ab4d07 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 8418a8d7439f5d0e614b6b1db21324e2dc33861d..fa571bfd24328475d90e0aee265701223a3d34eb 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>