mirror of
https://github.com/darlinghq/darling-libkqueue.git
synced 2024-10-07 01:03:27 +00:00
more evfd fix
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@209 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
This commit is contained in:
parent
2d104a3fe8
commit
0dccf87b47
@ -51,10 +51,12 @@ post_configure_hook() {
|
||||
evfilt_timer="src/posix/timer.c"
|
||||
fi
|
||||
if [ "$have_sys_eventfd_h" != "yes" ] ; then
|
||||
evfilt_user="" # TODO: "src/posix/user.c"
|
||||
sources="$sources src/posix/eventfd.c"
|
||||
else
|
||||
sources="$sources src/linux/eventfd.c"
|
||||
fi
|
||||
fi
|
||||
|
||||
sources="$sources src/$target/kevent.c src/$target/eventfd.c $evfilt_signal $evfilt_proc
|
||||
sources="$sources src/$target/kevent.c $evfilt_signal $evfilt_proc
|
||||
$evfilt_socket $evfilt_timer $evfilt_user $evfilt_vnode"
|
||||
}
|
||||
|
@ -31,13 +31,12 @@ struct eventfd *
|
||||
eventfd_create(void)
|
||||
{
|
||||
struct eventfd *e;
|
||||
int evfd;
|
||||
|
||||
e = malloc(sizeof(*e));
|
||||
if (e == NULL)
|
||||
return (NULL);
|
||||
|
||||
if (socketpair(AF_UNIX, SOCK_STREAM, 0, e->fd) < 0)
|
||||
if (socketpair(AF_UNIX, SOCK_STREAM, 0, e->fd) < 0) {
|
||||
free(e);
|
||||
return (NULL);
|
||||
}
|
||||
@ -46,7 +45,6 @@ eventfd_create(void)
|
||||
free(e);
|
||||
close(e->fd[0]);
|
||||
close(e->fd[1]);
|
||||
close(evfd);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user