summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-11-06 21:13:25 +0000
committerNick Mathewson <nickm@torproject.org>2009-11-06 21:13:25 +0000
commit4d48cf61a2734aa37a7a5904f5c1454a62aa943a (patch)
tree2526d2dbf72ba52f24f6d26ff5d6720b8c8ecc5f
parent5ec43fe446d399464125d7cc0d5d1182756c953f (diff)
downloadlibevent-4d48cf61a2734aa37a7a5904f5c1454a62aa943a.tar.gz
Fix kqueue.c build on GNU/kFreeBSD systems.
Yes, some people like to have a BSD-family kernel (thus getting kqueue) with a GNU-family libc (thus occasionally mandating _GNU_SOURCE). Thanks to Debian for noticing this. svn:r1514
-rw-r--r--ChangeLog2
-rw-r--r--kqueue.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f0a046e4..20987fbf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,7 +38,7 @@ Changes in 2.0.3-alpha:
o The event_base_new() and event_base_new_with_config() functions now never call exit() on failure. For backward "compatibility", event_init() still does, but more consistently.
o Remove compat/sys/_time.h. It interfered with system headers on HPUX, and its functionality has been subsumed by event2/util.h and util-internal.h.
o Add a new bufferevent_socket_connect_hostname() to encapsulate the resolve-then-connect operation.
-
+ o Build kqueue.c correctly on GNU/kFreeBSD platforms. Patch pulled upstream from Debian.
Changes in 2.0.2-alpha:
o Add a new flag to bufferevents to make all callbacks automatically deferred.
diff --git a/kqueue.c b/kqueue.c
index cbcbb41a..7a92bbda 100644
--- a/kqueue.c
+++ b/kqueue.c
@@ -30,6 +30,8 @@
#include "event-config.h"
#endif
+#define _GNU_SOURCE
+
#include <sys/types.h>
#ifdef _EVENT_HAVE_SYS_TIME_H
#include <sys/time.h>