From 7ec1bedeed55424f126ba35a26f1e0c1645a07a9 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Wed, 17 Nov 2021 13:55:50 -0500 Subject: [PATCH] features.h: Define _DEFAULT_SOURCE when _GNU_SOURCE is defined. As suggested by PulkoMandy. This was done before my commits yesterday, but those just reverted patches that had only been in since May, so it's not clear how much this is actually needed. Nonetheless it seems like the more correct thing to do. --- headers/compatibility/bsd/features.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headers/compatibility/bsd/features.h b/headers/compatibility/bsd/features.h index 50d35b4334..fc76b1da02 100644 --- a/headers/compatibility/bsd/features.h +++ b/headers/compatibility/bsd/features.h @@ -6,7 +6,7 @@ #define _FEATURES_H -#if defined(_BSD_SOURCE) \ +#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) \ || (!defined(__STRICT_ANSI__) && !defined(_POSIX_C_SOURCE)) #undef _DEFAULT_SOURCE #define _DEFAULT_SOURCE