From 56339de8502e8838b825453668c7388bbc0d448b Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Thu, 2 Mar 2023 08:35:45 +1000 Subject: build: define _GNU_SOURCE only on the command line Not in source files See https://ariadne.space/2021/12/21/stop-defining-feature-test-macros-in-your-code/ Signed-off-by: Steve Bennett --- auto.def | 2 ++ 1 file changed, 2 insertions(+) (limited to 'auto.def') diff --git a/auto.def b/auto.def index e9d6002..36ab1e3 100644 --- a/auto.def +++ b/auto.def @@ -209,6 +209,8 @@ cc-check-sizeof int # Default optimisation define-append AS_CPPFLAGS -O2 +define-append AS_CPPFLAGS -D_GNU_SOURCE + # check, but don't add to -cflags cc-with {} { cc-check-flags -fno-unwind-tables -fno-asynchronous-unwind-tables -- cgit v1.1