Skip to content

Commit

Permalink
Don't define _POSIX_C_SOURCE when building for NetBSD
Browse files Browse the repository at this point in the history
Resolves: #537
  • Loading branch information
ximion committed Nov 2, 2023
1 parent da92e3c commit d88ed03
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@ add_project_arguments(
)

# Vendor extensions in system headers
add_project_arguments('-D_POSIX_C_SOURCE=200809L', language: 'c')
if host_machine.system() != 'netbsd'
# on NetBSD, defining POSIX_C_SOURCE *removes* non-POSIX symbols from namespace,
# while on all other systems it adds them. Hence we only define this when not on NetBSD.
add_project_arguments('-D_POSIX_C_SOURCE=201710L', language: 'c')
endif

if cc.get_id() == 'clang'
# Clang doesn't understand autofree helpers on GMutexLocker and thinks
Expand Down

0 comments on commit d88ed03

Please sign in to comment.