Got basic code building with the roboRIO compiler.
Change-Id: I158caa4786542344e91949c62fd95a79015b653b
diff --git a/third_party/libevent/BUILD b/third_party/libevent/BUILD
index 50f714a..b576f52 100644
--- a/third_party/libevent/BUILD
+++ b/third_party/libevent/BUILD
@@ -1,5 +1,7 @@
licenses(['notice'])
+load('/tools/build_rules/select', 'compiler_select')
+
cc_library(
name = 'libevent',
visibility = ['//visibility:public'],
@@ -56,7 +58,9 @@
'-Wno-unused-parameter',
'-Wno-format-nonliteral',
'-Wno-cast-qual',
- '-Wno-incompatible-pointer-types-discards-qualifiers',
'-Wno-unused-function',
- ],
+ ] + compiler_select({
+ 'gcc': [],
+ 'clang': ['-Wno-incompatible-pointer-types-discards-qualifiers']
+ }),
)
diff --git a/third_party/libevent/buffer.c b/third_party/libevent/buffer.c
index 80a9e1b..de4ab52 100644
--- a/third_party/libevent/buffer.c
+++ b/third_party/libevent/buffer.c
@@ -2749,7 +2749,7 @@
if (!chain)
return (-1);
chain->flags |= EVBUFFER_REFERENCE | EVBUFFER_IMMUTABLE;
- chain->buffer = (const u_char *)data;
+ chain->buffer = (u_char *)data;
chain->buffer_len = datlen;
chain->off = datlen;