util/compatfd.c: Only include <sys/syscall.h> if CONFIG_SIGNALFD

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>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20200703145614.16684-8-peter.maydell@linaro.org
[PMM: Expanded commit message]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
David CARLIER 2020-07-13 14:36:10 +01:00 committed by Peter Maydell
parent 652a46ebba
commit 81b7b1e21d

View File

@ -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
{