Skip to content

Commit

Permalink
Define _GNU_SOURCE on non-Windows (fixes missing prototypes)
Browse files Browse the repository at this point in the history
  • Loading branch information
fincs committed Apr 4, 2020
1 parent 3a6e52f commit f997445
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ pre_args = [
'-DPACKAGE_STRING="@0@ @1@"'.format(meson.project_name(), meson.project_version()),
'-DDESKTOP',
'-D_USE_MATH_DEFINES',
'-Werror=implicit-function-declaration',
]

if host_machine.system() != 'windows'
pre_args += '-D_GNU_SOURCE'
foreach f : [ 'posix_memalign' ]
if compiler_c.has_function(f)
pre_args += '-DHAVE_@0@'.format(f.to_upper())
Expand Down

0 comments on commit f997445

Please sign in to comment.