diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2017-08-01 04:07:39 -0700 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-08-02 18:01:18 +0300 |
commit | 5bdd75940bcbf83dfd1c1ca6f2dd6fbdf7332c16 (patch) | |
tree | 600327091cbba4c026254193fccc7427439f7e2b /test cases | |
parent | 990da9e54e24ee9774bcf4b2912d4f7f853495a8 (diff) | |
download | meson-5bdd75940bcbf83dfd1c1ca6f2dd6fbdf7332c16.zip meson-5bdd75940bcbf83dfd1c1ca6f2dd6fbdf7332c16.tar.gz meson-5bdd75940bcbf83dfd1c1ca6f2dd6fbdf7332c16.tar.bz2 |
Fix ppoll() test to work on non-glibc platforms
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/common/111 has header symbol/meson.build | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test cases/common/111 has header symbol/meson.build b/test cases/common/111 has header symbol/meson.build index 2a9f5d4..54cedce 100644 --- a/test cases/common/111 has header symbol/meson.build +++ b/test cases/common/111 has header symbol/meson.build @@ -14,8 +14,9 @@ foreach comp : [cc, cpp] assert (not comp.has_header_symbol('stdlol.h', 'int'), 'shouldn\'t be able to find "int" with invalid header') endforeach -# This is likely only available on Glibc, so just test for it -if cc.has_function('ppoll') +# This is available on Glibc, Solaris & the BSD's, so just test for _GNU_SOURCE +# on Linux +if cc.has_function('ppoll') and host_machine.system() == 'linux' assert (not cc.has_header_symbol('poll.h', 'ppoll'), 'ppoll should not be accessible without _GNU_SOURCE') assert (cc.has_header_symbol('poll.h', 'ppoll', prefix : '#define _GNU_SOURCE'), 'ppoll should be accessible with _GNU_SOURCE') endif |