[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 7/9] util/compatfd.c: Only include <sys/syscall.h> if CONFIG_S
From: |
Peter Maydell |
Subject: |
[PATCH v3 7/9] util/compatfd.c: Only include <sys/syscall.h> if CONFIG_SIGNALFD |
Date: |
Fri, 3 Jul 2020 15:56:12 +0100 |
From: David CARLIER <devnexen@gmail.com>
util/compatfd.c includes <sys/syscall.h> so that the CONFIG_SIGNALFD
code can use SYS_signalfd. Guard the #include with CONFIG_SIGNALFD
to avoid portability issues on hosts like Haiku which do not
provide that header file.
Signed-off-by: David Carlier <devnexen@gmail.com>
[PMM: Expanded commit message]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
util/compatfd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/util/compatfd.c b/util/compatfd.c
index c296f55d148..ee47dd80897 100644
--- a/util/compatfd.c
+++ b/util/compatfd.c
@@ -16,7 +16,9 @@
#include "qemu/osdep.h"
#include "qemu/thread.h"
+#if defined(CONFIG_SIGNALFD)
#include <sys/syscall.h>
+#endif
struct sigfd_compat_info
{
--
2.20.1
- [PATCH v3 3/9] build: Check that mlockall() exists, (continued)
- [PATCH v3 3/9] build: Check that mlockall() exists, Peter Maydell, 2020/07/03
- [PATCH v3 4/9] osdep.h: Always include <sys/signal.h> if it exists, Peter Maydell, 2020/07/03
- [PATCH v3 6/9] bswap.h: Include <endian.h> on Haiku for bswap operations, Peter Maydell, 2020/07/03
- [PATCH v3 5/9] osdep.h: For Haiku, define SIGIO as equivalent to SIGPOLL, Peter Maydell, 2020/07/03
- [PATCH v3 7/9] util/compatfd.c: Only include <sys/syscall.h> if CONFIG_SIGNALFD,
Peter Maydell <=
- [PATCH v3 8/9] util/oslib-posix.c: Implement qemu_init_exec_dir() for Haiku, Peter Maydell, 2020/07/03
- [PATCH v3 9/9] util/drm: make portable by avoiding struct dirent d_type, Peter Maydell, 2020/07/03
- Re: [PATCH v3 0/9] Build fixes for Haiku, Peter Maydell, 2020/07/11