From 636e85c98d990518f3f2a5e3cecabd4a8ee7af77 Mon Sep 17 00:00:00 2001 From: Andrea Shepard <andrea@special-circumstanc.es> Date: Tue, 10 Mar 2020 10:35:58 +0000 Subject: [PATCH] Restore -D_POSIX_C_SOURCE=200809L in build flags on Linux; we'll figure out report of Mac OS breakage later --- SConstruct | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index 149951b0..9349525e 100644 --- a/SConstruct +++ b/SConstruct @@ -118,8 +118,15 @@ if env['CC'] == 'cl': ] ) else: - # -Wno-clobbered only really works with gcc >= 4.2.x, but ... scons - env.MergeFlags('-std=c99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-attributes -Wno-unused-variable') + if env['PLATFORM'] == 'darwin': + # It's reported -D_POSIX_C_SOURCE breaks the Mac OS build; I think we + # may need _DARWIN_C_SOURCE instead/in addition to, but let's wait to + # have access to a Mac to test/repo + env.MergeFlags('-std=c99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-attributes -Wno-unused-variable') + else: + # Using -D_POSIX_C_SOURCE=200809L here, not on an ad-hoc basis when, + # #including, is important + env.MergeFlags('-std=c99 -D_POSIX_C_SOURCE=200809L -Wall -Wextra -Werror -Wno-unused-parameter -Wno-attributes -Wno-unused-variable') # Linker options if env['PLATFORM'] == 'darwin': -- GitLab