13
0

build: Set _POSIX_C_SOURCE=200809L instead of comment about -std=gnu99 in 8fea1ea42e

We are converging towards setting it globally.
This commit is contained in:
Mads Kiilerich 2024-09-12 21:20:48 +02:00 committed by Robin Gareus
parent 57c5aa95f7
commit b7249c8fe7
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -35,6 +35,7 @@ def build(bld):
autowaf.ensure_visible_symbols (obj, False) autowaf.ensure_visible_symbols (obj, False)
obj.export_includes = ['hidapi'] obj.export_includes = ['hidapi']
obj.includes = ['hidapi'] obj.includes = ['hidapi']
obj.defines = ['_POSIX_C_SOURCE=200809L']
obj.name = 'hidapi' obj.name = 'hidapi'
obj.target = 'hidapi' obj.target = 'hidapi'
obj.vnum = HIDAPI_VERSION obj.vnum = HIDAPI_VERSION
@ -51,7 +52,6 @@ def build(bld):
obj.source = 'mac/hid.c' obj.source = 'mac/hid.c'
obj.framework = [ 'IOKit', 'CoreFoundation' ] obj.framework = [ 'IOKit', 'CoreFoundation' ]
else: else:
# with '-strict' this needs "-std=gnu99" to compile w/o warnings
obj.source = 'linux/hid.c' obj.source = 'linux/hid.c'
if re.search ("linux", sys.platform) != None: if re.search ("linux", sys.platform) != None:
obj.uselib = 'UDEV' obj.uselib = 'UDEV'