commit 3a3d7052df79ba45726f0faa3ada5fe2b23c215e
parent b95e5ade712319ab5fa247eee1958bc3cfe24d3e
Author: Chris Bracken <chris@bracken.jp>
Date: Thu, 19 Feb 2026 15:08:46 +0900
build: declare _POSIX_C_SOURCE for open_memstream
Also break out a gout_test config.
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/BUILD.gn b/BUILD.gn
@@ -5,6 +5,7 @@ config("gout_config") {
] + system_include_dirs
lib_dirs = [] + system_lib_dirs
defines = [
+ "_POSIX_C_SOURCE=200809L",
"_XOPEN_SOURCE=700",
"_DEFAULT_SOURCE",
"_BSD_SOURCE",
@@ -57,6 +58,10 @@ executable("gout_index") {
deps = [ "//src:gout_index_srcs" ]
}
+config("gout_test_config") {
+ defines = [ "_DARWIN_C_SOURCE" ]
+}
+
executable("gout_tests") {
testonly = true
@@ -66,6 +71,10 @@ executable("gout_tests") {
"src/gout_tests_main.c",
"src/utils_tests.c",
]
+ configs += [
+ ":gout_config",
+ ":gout_test_config",
+ ]
deps = [
"//src:gout_srcs",
"//third_party/utest:utest_headers",