diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-05-01 21:29:42 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:51:56 -0500 |
commit | 19a6878380eec4a66fb9f15f4d7a16d80c4ee84d (patch) | |
tree | fb59d0dc63d9f89e36aa58537c78acea4c003800 /source4/lib/events/events_epoll.c | |
parent | 20a0206a102694a1eae7be73be6ae91ff7f6abce (diff) | |
download | samba-19a6878380eec4a66fb9f15f4d7a16d80c4ee84d.tar.gz samba-19a6878380eec4a66fb9f15f4d7a16d80c4ee84d.tar.bz2 samba-19a6878380eec4a66fb9f15f4d7a16d80c4ee84d.zip |
r22634: make the events system much less dependent on the samba4 build system
(This used to be commit b0c8c1cd21e3f91431504d70a4bc0d3c6dee6071)
Diffstat (limited to 'source4/lib/events/events_epoll.c')
-rw-r--r-- | source4/lib/events/events_epoll.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/source4/lib/events/events_epoll.c b/source4/lib/events/events_epoll.c index 58eeb08cd5..41a6509e36 100644 --- a/source4/lib/events/events_epoll.c +++ b/source4/lib/events/events_epoll.c @@ -165,9 +165,9 @@ static void epoll_mod_event(struct epoll_event_context *epoll_ev, struct fd_even static void epoll_change_event(struct epoll_event_context *epoll_ev, struct fd_event *fde) { - BOOL got_error = (fde->additional_flags & EPOLL_ADDITIONAL_FD_FLAG_GOT_ERROR); - BOOL want_read = (fde->flags & EVENT_FD_READ); - BOOL want_write= (fde->flags & EVENT_FD_WRITE); + bool got_error = (fde->additional_flags & EPOLL_ADDITIONAL_FD_FLAG_GOT_ERROR); + bool want_read = (fde->flags & EVENT_FD_READ); + bool want_write= (fde->flags & EVENT_FD_WRITE); if (epoll_ev->epoll_fd == -1) return; @@ -413,7 +413,17 @@ static const struct event_ops epoll_event_ops = { .loop_wait = epoll_event_loop_wait, }; -NTSTATUS events_epoll_init(void) +bool events_epoll_init(void) { return event_register_backend("epoll", &epoll_event_ops); } + +#if _SAMBA_BUILD_ +NTSTATUS s4_events_epoll_init(void) +{ + if (!events_epoll_init()) { + return NT_STATUS_INTERNAL_ERROR; + } + return NT_STATUS_OK; +} +#endif |