linux-stable/tools/testing
John Hubbard c9edeb94d1 selftests/futex: pass _GNU_SOURCE without a value to the compiler
[ Upstream commit cb708ab9f5 ]

It's slightly better to set _GNU_SOURCE in the source code, but if one
must do it via the compiler invocation, then the best way to do so is
this:

    $(CC) -D_GNU_SOURCE=

...because otherwise, if this form is used:

    $(CC) -D_GNU_SOURCE

...then that leads the compiler to set a value, as if you had passed in:

    $(CC) -D_GNU_SOURCE=1

That, in turn, leads to warnings under both gcc and clang, like this:

    futex_requeue_pi.c:20: warning: "_GNU_SOURCE" redefined

Fix this by using the "-D_GNU_SOURCE=" form.

Reviewed-by: Edward Liaw <edliaw@google.com>
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-07-25 09:50:43 +02:00
..
crypto/chacha20-s390
cxl cxl/region: check interleave capability 2024-07-05 09:34:07 +02:00
fault-injection
ktest ktest: force $buildonly = 1 for 'make_warnings_file' test type 2024-04-13 13:07:37 +02:00
kunit kunit: tool: fix parsing of test attributes 2024-02-05 20:14:15 +00:00
memblock memblock tests: fix warning ‘struct seq_file’ declared inside parameter list 2023-09-14 10:51:28 +03:00
nvdimm
radix-tree maple_tree: do not preallocate nodes for slot stores 2024-01-05 15:19:43 +01:00
scatterlist
selftests selftests/futex: pass _GNU_SOURCE without a value to the compiler 2024-07-25 09:50:43 +02:00
vsock vsock/test: fix SEQPACKET message bounds test 2023-12-03 07:33:05 +01:00