mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
util/compatfd.c: use libc signalfd wrapper instead of raw syscall
This allows the use of native signalfd instead of the sigtimedwait based emulation on systems other than Linux. Signed-off-by: Kacper Słomiński <kacper.slominski72@gmail.com> Message-Id: <20210905011621.200785-1-kacper.slominski72@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
ecc00666a0
commit
6bd17dccb6
2 changed files with 5 additions and 7 deletions
|
@ -1420,10 +1420,9 @@ config_host_data.set('CONFIG_POSIX_MADVISE', cc.links(gnu_source_prefix + '''
|
|||
#include <stddef.h>
|
||||
int main(void) { return posix_madvise(NULL, 0, POSIX_MADV_DONTNEED); }'''))
|
||||
config_host_data.set('CONFIG_SIGNALFD', cc.links(gnu_source_prefix + '''
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <signal.h>
|
||||
int main(void) { return syscall(SYS_signalfd, -1, NULL, _NSIG / 8); }'''))
|
||||
#include <sys/signalfd.h>
|
||||
#include <stddef.h>
|
||||
int main(void) { return signalfd(-1, NULL, SFD_CLOEXEC); }'''))
|
||||
config_host_data.set('CONFIG_SPLICE', cc.links(gnu_source_prefix + '''
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue