From 2a4b472c3c8fbbb95b104f9b7699a5ceeeb5b006 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Mon, 13 Jul 2020 14:36:09 +0100 Subject: osdep.h: Always include if it exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Regularize our handling of : currently we include it in osdep.h, but only for OpenBSD, and we include it without an ifdef guard in a couple of C files. This causes problems for Haiku, which doesn't have that header. Instead, check in configure whether sys/signal.h exists, and if it does then always include it from osdep.h. Signed-off-by: David Carlier Reviewed-by: Peter Maydell Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell Message-id: 20200703145614.16684-5-peter.maydell@linaro.org [PMM: Expanded commit message; rename to HAVE_SYS_SIGNAL_H] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- include/qemu/osdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/qemu/osdep.h') diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 0fc206ae61..14059bce5a 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -104,7 +104,7 @@ extern int daemon(int, int); #include #include -#ifdef __OpenBSD__ +#ifdef HAVE_SYS_SIGNAL_H #include #endif -- cgit 1.4.1 From 8bf0f1754a8321568d536c2f33b013279fc4aaaa Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Mon, 13 Jul 2020 14:36:09 +0100 Subject: osdep.h: For Haiku, define SIGIO as equivalent to SIGPOLL Haiku doesn't provide SIGIO; fix this up in osdep.h by defining it as equal to SIGPOLL. Signed-off-by: David Carlier Reviewed-by: Peter Maydell Reviewed-by: Thomas Huth Signed-off-by: Peter Maydell Message-id: 20200703145614.16684-6-peter.maydell@linaro.org [PMM: Expanded commit message] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- include/qemu/osdep.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/qemu/osdep.h') diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 14059bce5a..979a403984 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -432,6 +432,10 @@ void qemu_anon_ram_free(void *ptr, size_t size); #define HAVE_CHARDEV_PARPORT 1 #endif +#if defined(__HAIKU__) +#define SIGIO SIGPOLL +#endif + #if defined(CONFIG_LINUX) #ifndef BUS_MCEERR_AR #define BUS_MCEERR_AR 4 -- cgit 1.4.1