* GNU GPL, version 2 or (at your option) any later version.
*/
-#include "qemu-common.h"
-#include "qemu/compatfd.h"
+#include "qemu/osdep.h"
#include "qemu/thread.h"
#include <sys/syscall.h>
return qemu_signalfd_compat(mask);
}
-
-bool qemu_signalfd_available(void)
-{
-#ifdef CONFIG_SIGNALFD
- sigset_t mask;
- int fd;
- bool ok;
- sigemptyset(&mask);
- errno = 0;
- fd = syscall(SYS_signalfd, -1, &mask, _NSIG / 8);
- ok = (errno != ENOSYS);
- if (fd >= 0) {
- close(fd);
- }
- return ok;
-#else
- return false;
-#endif
-}