Fix libevent compiling for the roboRIO with the correct headers
Change-Id: Ibfd21bf0a01b8a75380fb7fd2d234220b1aec68b
diff --git a/third_party/libevent/BUILD b/third_party/libevent/BUILD
index 4a05b48..ee778f0 100644
--- a/third_party/libevent/BUILD
+++ b/third_party/libevent/BUILD
@@ -1,6 +1,6 @@
licenses(['notice'])
-load('/tools/build_rules/select', 'compiler_select', 'address_size_select')
+load('/tools/build_rules/select', 'compiler_select', 'address_size_select', 'cpu_select')
cc_library(
name = 'libevent',
@@ -122,7 +122,6 @@
'_EVENT_HAVE_SYS_TYPES_H=1',
'_EVENT_HAVE_SYS_UIO_H=1',
'_EVENT_HAVE_SYS_WAIT_H=1',
- '_EVENT_HAVE_TAILQFOREACH=1',
'_EVENT_HAVE_TIMERADD=1',
'_EVENT_HAVE_TIMERCLEAR=1',
'_EVENT_HAVE_TIMERCMP=1',
@@ -159,6 +158,11 @@
'_EVENT_SIZEOF_SIZE_T=8',
'_EVENT_SIZEOF_VOID_P=8',
],
+ }) + cpu_select({
+ 'amd64': [
+ '_EVENT_HAVE_TAILQFOREACH=1',
+ ],
+ 'roborio': [],
}),
copts = [
diff --git a/third_party/libevent/buffer.c b/third_party/libevent/buffer.c
index de4ab52..0e61fbe 100644
--- a/third_party/libevent/buffer.c
+++ b/third_party/libevent/buffer.c
@@ -90,6 +90,7 @@
#include "evthread-internal.h"
#include "evbuffer-internal.h"
#include "bufferevent-internal.h"
+#include "event-internal.h"
/* some systems do not have MAP_FAILED */
#ifndef MAP_FAILED