diff options
author | Andrea Pappacoda <andrea@pappacoda.it> | 2024-09-28 12:00:43 +0200 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2024-09-30 10:19:43 -0700 |
commit | a31f8d68cb068ad84fab08c901b7f8c707dc420f (patch) | |
tree | 3e5d57dc050d3e9a020f450a72c7f7ded5e94a04 /docs/markdown/snippets | |
parent | fb4995a2c607b8289ae97a3faa5917f2887da294 (diff) | |
download | meson-a31f8d68cb068ad84fab08c901b7f8c707dc420f.zip meson-a31f8d68cb068ad84fab08c901b7f8c707dc420f.tar.gz meson-a31f8d68cb068ad84fab08c901b7f8c707dc420f.tar.bz2 |
tests: use statx instead of sendmmsg in has_function test
Both recvmmsg/sendmmsg and statx require the `_GNU_SOURCE` symbol to be
defined to be shown in headers, but statx has the additional property of
being defined on all glibc systems[1], unlike recvmmsg which isn't
implemented on Hurd[2][3].
With this fix, all tests now pass on Hurd.
$ cat meson.build
project('test', 'c')
cc = meson.get_compiler('c')
cc.has_header_symbol('sys/stat.h', 'statx')
cc.has_header_symbol('sys/stat.h', 'statx', prefix: '#define _GNU_SOURCE')
cc.has_function('statx')
$ meson setup build
The Meson build system
Version: 1.5.1
Source dir: /tmp/tmp.XcWk4fMra4
Build dir: /tmp/tmp.XcWk4fMra4/build
Build type: native build
Project name: test
Project version: undefined
C compiler for the host machine: cc (gcc 14.2.0 "cc (Debian 14.2.0-3) 14.2.0")
C linker for the host machine: cc ld.bfd 2.43.1
Host machine cpu family: x86_64
Host machine cpu: x86_64
Header "sys/stat.h" has symbol "statx" : NO
Header "sys/stat.h" has symbol "statx" : YES
Checking for function "statx" : YES
Build targets in project: 0
[1]: https://sourceware.org/git/?p=glibc.git;a=blob;f=io/statx_generic.c;h=93faf12297cfcd37ba005a02e991eab351d74174;hb=HEAD
[2]: https://www.gnu.org/software/hurd/open_issues/glibc.html#recvmmsg
[3]: https://github.com/mesonbuild/meson/pull/4351
Diffstat (limited to 'docs/markdown/snippets')
0 files changed, 0 insertions, 0 deletions