Skip to content

Commit f997445

Browse files
committed
Define _GNU_SOURCE on non-Windows (fixes missing prototypes)
1 parent 3a6e52f commit f997445

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ pre_args = [
2626
'-DPACKAGE_STRING="@0@ @1@"'.format(meson.project_name(), meson.project_version()),
2727
'-DDESKTOP',
2828
'-D_USE_MATH_DEFINES',
29+
'-Werror=implicit-function-declaration',
2930
]
3031

3132
if host_machine.system() != 'windows'
33+
pre_args += '-D_GNU_SOURCE'
3234
foreach f : [ 'posix_memalign' ]
3335
if compiler_c.has_function(f)
3436
pre_args += '-DHAVE_@0@'.format(f.to_upper())

0 commit comments

Comments
 (0)