diff options
| author | ruki <[email protected]> | 2025-12-03 00:27:26 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-12-03 00:27:26 +0800 |
| commit | c1459f60d084d8be5d967a4353087fce0384019a (patch) | |
| tree | 2c685de53991c6336e56cc2c9aa75c471a1e3b57 /core | |
| parent | bc7caf95a9cfdefed930937e8450997a4cdc8191 (diff) | |
fix solaris build
Diffstat (limited to 'core')
| m--------- | core/src/tbox/tbox | 0 | ||||
| -rw-r--r-- | core/xmake.lua | 5 | ||||
| -rwxr-xr-x | core/xmake.sh | 5 |
3 files changed, 10 insertions, 0 deletions
diff --git a/core/src/tbox/tbox b/core/src/tbox/tbox -Subproject 1d777aca24121df60d4219e08c0230e30fb0575 +Subproject 5ec46dff6581ce3b0c2b3ea42bfd766fcd91ef2 diff --git a/core/xmake.lua b/core/xmake.lua index e819f572b..216eae3eb 100644 --- a/core/xmake.lua +++ b/core/xmake.lua @@ -24,6 +24,11 @@ add_cxflags("-Wno-error=deprecated-declarations", "-fno-strict-aliasing", "-Wno- -- add definitions add_defines("_GNU_SOURCE=1", "_FILE_OFFSET_BITS=64", "_LARGEFILE_SOURCE") +-- ensure POSIX/XOPEN features are available on Solaris (for setenv, unsetenv, clock_gettime, etc.) +if is_plat("solaris") then + add_defines("_POSIX_C_SOURCE=200112L", "_XOPEN_SOURCE=600") +end + -- add vectorexts --[[ if is_arch("x86", "x64", "i386", "x86_64") then diff --git a/core/xmake.sh b/core/xmake.sh index 5a8fcb072..fd8291cc9 100755 --- a/core/xmake.sh +++ b/core/xmake.sh @@ -12,6 +12,11 @@ set_languages "c99" # add definitions add_defines "_GNU_SOURCE=1" "_FILE_OFFSET_BITS=64" "_LARGEFILE_SOURCE" +# ensure POSIX/XOPEN features are available on Solaris (for setenv, unsetenv, clock_gettime, etc.) +if is_plat "solaris"; then + add_defines "_POSIX_C_SOURCE=200112L" "_XOPEN_SOURCE=600" +fi + # disable some compiler errors if is_plat "macosx"; then add_cxflags "-Wno-error=deprecated-declarations" "-fno-strict-aliasing" "-Wno-error=nullability-completeness" "-Wno-error=parentheses-equality" |
