Skip to content

Commit c0cb758

Browse files
michaelforneyhuth
authored andcommitted
osdep.h: Remove <sys/signal.h> include
Prior to 2a4b472, sys/signal.h was only included on OpenBSD (apart from two .c files). The POSIX standard location for this header is just <signal.h> and in fact, OpenBSD's signal.h includes sys/signal.h itself. Unconditionally including <sys/signal.h> on musl causes warnings for just about every source file: /usr/include/sys/signal.h:1:2: warning: #warning redirecting incorrect #include <sys/signal.h> to <signal.h> [-Wcpp] 1 | #warning redirecting incorrect #include <sys/signal.h> to <signal.h> | ^~~~~~~ Since there don't seem to be any platforms which require including <sys/signal.h> in addition to <signal.h>, and some platforms like Haiku lack it completely, just remove it. Tested building on OpenBSD after removing this include. Signed-off-by: Michael Forney <[email protected]> Tested-by: John Snow <[email protected]> Reviewed-by: Eric Blake <[email protected]> Reviewed-by: Thomas Huth <[email protected]> Message-Id: <[email protected]> Signed-off-by: Thomas Huth <[email protected]>
1 parent 48202c7 commit c0cb758

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

include/qemu/osdep.h

-4
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,6 @@ extern int daemon(int, int);
104104
#include <setjmp.h>
105105
#include <signal.h>
106106

107-
#ifdef HAVE_SYS_SIGNAL_H
108-
#include <sys/signal.h>
109-
#endif
110-
111107
#ifndef _WIN32
112108
#include <sys/wait.h>
113109
#else

meson.build

-1
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,6 @@ config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h'))
11131113
config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h'))
11141114
config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h'))
11151115
config_host_data.set('HAVE_SYS_KCOV_H', cc.has_header('sys/kcov.h'))
1116-
config_host_data.set('HAVE_SYS_SIGNAL_H', cc.has_header('sys/signal.h'))
11171116

11181117
ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target
11191118
arrays = ['CONFIG_AUDIO_DRIVERS', 'CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST']

0 commit comments

Comments
 (0)