summaryrefslogtreecommitdiff
path: root/source4/lib/events/events_standard.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-05-01 21:29:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:51:56 -0500
commit19a6878380eec4a66fb9f15f4d7a16d80c4ee84d (patch)
treefb59d0dc63d9f89e36aa58537c78acea4c003800 /source4/lib/events/events_standard.c
parent20a0206a102694a1eae7be73be6ae91ff7f6abce (diff)
downloadsamba-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_standard.c')
-rw-r--r--source4/lib/events/events_standard.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/source4/lib/events/events_standard.c b/source4/lib/events/events_standard.c
index 3b26b1073d..8495ccdec0 100644
--- a/source4/lib/events/events_standard.c
+++ b/source4/lib/events/events_standard.c
@@ -180,9 +180,9 @@ static void epoll_mod_event(struct std_event_context *std_ev, struct fd_event *f
static void epoll_change_event(struct std_event_context *std_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 (std_ev->epoll_fd == -1) return;
@@ -549,7 +549,17 @@ static const struct event_ops std_event_ops = {
};
-NTSTATUS events_standard_init(void)
+bool events_standard_init(void)
{
return event_register_backend("standard", &std_event_ops);
}
+
+#if _SAMBA_BUILD_
+NTSTATUS s4_events_standard_init(void)
+{
+ if (!events_standard_init()) {
+ return NT_STATUS_INTERNAL_ERROR;
+ }
+ return NT_STATUS_OK;
+}
+#endif