On 21/12/2020 01.53, Jiaxun Yang wrote:
signal.h is equlevant of sys/signal.h on Linux, musl would complain wrong usage of sys/signal.h. In file included from /builds/FlyGoat/qemu/include/qemu/osdep.h:108, from ../tests/qemu-iotests/socket_scm_helper.c:13: /usr/include/sys/signal.h:1:2: error: #warning redirecting incorrect #include <sys/signal.h> to <signal.h> [-Werror=cpp] 1 | #warning redirecting incorrect #include <sys/signal.h> to <signal.h> | ^~~~~~~ Signed-off-by: Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx> --- meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 372576f82c..1ef8722b3a 100644 --- a/meson.build +++ b/meson.build @@ -841,7 +841,10 @@ config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h')) config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h')) config_host_data.set('HAVE_SYS_KCOV_H', cc.has_header('sys/kcov.h')) -config_host_data.set('HAVE_SYS_SIGNAL_H', cc.has_header('sys/signal.h')) +if targetos != 'linux' + # signal.h is equlevant of sys/signal.h on Linux + config_host_data.set('HAVE_SYS_SIGNAL_H', cc.has_header('sys/signal.h')) +endif
Seems like it sys/signal.h was introduced for OpenBSD once (see commit 128ab2ff50a), so this new check should be fine.
Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>