Thread (33 messages) 33 messages, 9 authors, 2024-05-09

Re: [PATCH v2 0/5] Define _GNU_SOURCE for sources using

From: Kees Cook <hidden>
Date: 2024-05-07 23:28:54
Also in: bpf, kvm, kvm-riscv, kvmarm, linux-fsdevel, linux-input, linux-iommu, linux-kselftest, linux-mm, linux-riscv, linux-rtc, linux-security-module, linux-sound, lkml, mptcp

On Tue, May 07, 2024 at 09:38:25PM +0000, Edward Liaw wrote:
809216233555 ("selftests/harness: remove use of LINE_MAX") introduced
asprintf into kselftest_harness.h, which is a GNU extension and needs
_GNU_SOURCE to either be defined prior to including headers or with the
-D_GNU_SOURCE flag passed to the compiler.

v1: https://lore.kernel.org/linux-kselftest/20240430235057.1351993-1-edliaw@google.com/ (local)
v2: add -D_GNU_SOURCE to KHDR_INCLUDES so that it is in a single
location.  Remove #define _GNU_SOURCE from source code to resolve
redefinition warnings.

Edward Liaw (5):
  selftests: Compile kselftest headers with -D_GNU_SOURCE
  selftests/sgx: Include KHDR_INCLUDES in Makefile
  selftests: Include KHDR_INCLUDES in Makefile
  selftests: Drop define _GNU_SOURCE
  selftests: Drop duplicate -D_GNU_SOURCE
It's a lot of churn, but I don't see a way to do it differently. :)

Reviewed-by: Kees Cook <redacted>

-- 
Kees Cook
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help