mirror of
https://github.com/darlinghq/darling-libkqueue.git
synced 2024-11-26 21:20:38 +00:00
Rework __linux_syscall
This commit is contained in:
parent
7e2ade452a
commit
f5640390d7
@ -26,7 +26,11 @@ struct filter;
|
||||
#if HAVE_SYS_EVENTFD_H
|
||||
# include <sys/eventfd.h>
|
||||
#else
|
||||
#ifdef DARLING
|
||||
# define eventfd(a,b) __linux_syscall_2args(SYS_eventfd, (a), (b))
|
||||
#else // !DARLING
|
||||
# define eventfd(a,b) syscall(SYS_eventfd, (a), (b))
|
||||
#endif
|
||||
|
||||
static inline int eventfd_write(int fd, uint64_t val) {
|
||||
if (write(fd, &val, sizeof(val)) < (ssize_t) sizeof(val))
|
||||
@ -44,7 +48,6 @@ struct filter;
|
||||
*/
|
||||
#ifdef DARLING
|
||||
#include <darling/emulation/base.h>
|
||||
# define syscall __linux_syscall
|
||||
#else
|
||||
# define _GNU_SOURCE
|
||||
# include <linux/unistd.h>
|
||||
|
Loading…
Reference in New Issue
Block a user