Skip to content

Commit a9d42a7

Browse files
alyssaisdcbaker
authored andcommitted
test cases/common/103 has header symbol: fix for musl 1.2.5
musl 1.2.5 exposes this symbol in the default profile, and in future will expose it unconditionally, as it is on track to becoming part of POSIX. So rather than maintaining a list of systems to run this on, let's just skip testing the feature test macro if we find ppoll in the default profile.
1 parent 8357548 commit a9d42a7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test cases/common/103 has header symbol/meson.build

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ foreach comp : [cc, cpp]
1818
assert (not comp.has_header_symbol('stdlol.h', 'int'), 'shouldn\'t be able to find "int" with invalid header')
1919
endforeach
2020

21-
# This is available on Glibc, Solaris & the BSD's, so just test for _GNU_SOURCE
22-
# on Linux
23-
if cc.has_function('ppoll') and host_machine.system() == 'linux'
24-
assert (not cc.has_header_symbol('poll.h', 'ppoll'), 'ppoll should not be accessible without _GNU_SOURCE')
21+
# Glibc requires _GNU_SOURCE for ppoll. Other libcs do not.
22+
if cc.has_function('ppoll') and not cc.has_header_symbol('poll.h', 'ppoll')
2523
assert (cc.has_header_symbol('poll.h', 'ppoll', prefix : '#define _GNU_SOURCE'), 'ppoll should be accessible with _GNU_SOURCE')
2624
endif
2725

0 commit comments

Comments
 (0)