Skip to content

Commit 68a3c8a

Browse files
committed
registry/libevent: Fix android include and rename
Signed-off-by: Ryan Northey <ryan@synca.io>
1 parent 46dd2ba commit 68a3c8a

22 files changed

Lines changed: 671 additions & 51 deletions

modules/libevent/release-2.2.2-alpha.envoy/MODULE.bazel renamed to modules/libevent/2.2.2-alpha.envoy/MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module(
22
name = "libevent",
3-
version = "release-2.2.2-alpha.envoy",
3+
version = "2.2.2-alpha.envoy",
44
compatibility_level = 1,
55
bazel_compatibility = [">=7.2.1"],
66
)

modules/libevent/release-2.2.2-alpha.envoy/overlay/BUILD.bazel renamed to modules/libevent/2.2.2-alpha.envoy/overlay/BUILD.bazel

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ cc_library(
5555
"epolltable-internal.h",
5656
"evbuffer-internal.h",
5757
"evconfig-private.h",
58+
"evconfig-private_android.h",
5859
"evconfig-private_apple.h",
5960
"evconfig-private_linux.h",
6061
"event-internal.h",
62+
"event2-config_android.h",
6163
"event2-config_apple.h",
6264
"event2-config_common.h",
6365
"event2-config_linux.h",
@@ -76,7 +78,12 @@ cc_library(
7678
"strlcpy-internal.h",
7779
"time-internal.h",
7880
"util-internal.h",
79-
],
81+
] + select({
82+
"@platforms//os:windows": [
83+
"wepoll.h",
84+
],
85+
"//conditions:default": [],
86+
}),
8087
visibility = [":__subpackages__"],
8188
)
8289

@@ -115,7 +122,6 @@ cc_library(
115122
"devpoll.c",
116123
"epoll.c",
117124
"event.c",
118-
"event_tagging.c",
119125
"evmap.c",
120126
"evport.c",
121127
"evthread.c",
@@ -131,11 +137,16 @@ cc_library(
131137
"strlcpy.c",
132138
"watch.c",
133139
] + select({
140+
"@platforms//os:linux": ["signalfd.c"],
141+
"@platforms//os:android": ["signalfd.c"],
142+
"//conditions:default": [],
143+
}) + select({
134144
"@platforms//os:windows": [
135145
"buffer_iocp.c",
136146
"bufferevent_async.c",
137147
"event_iocp.c",
138148
"evthread_win32.c",
149+
"wepoll.c",
139150
"win32select.c",
140151
],
141152
"//conditions:default": [],
@@ -171,8 +182,10 @@ cc_library(
171182
cc_library(
172183
name = "event_extra_private_headers",
173184
hdrs = [
185+
"evdns-internal.h",
174186
"evrpc-internal.h",
175187
"http-internal.h",
188+
"sha1.h",
176189
],
177190
visibility = [":__subpackages__"],
178191
)
@@ -188,6 +201,7 @@ EVENT_EXTRA_PUBLIC_HEADERS = [
188201
"include/event2/rpc.h",
189202
"include/event2/rpc_compat.h",
190203
"include/event2/rpc_struct.h",
204+
"include/event2/ws.h",
191205
"include/evhttp.h",
192206
"include/evrpc.h",
193207
]
@@ -196,8 +210,15 @@ cc_library(
196210
name = "event_extra",
197211
srcs = [
198212
"evdns.c",
213+
"event_tagging.c",
199214
"evrpc.c",
200215
"http.c",
216+
# sha1.c derives endianness from BYTE_ORDER, which it obtains via
217+
# EVENT__HAVE_ENDIAN_H / EVENT__HAVE_SYS_ENDIAN_H from the config
218+
# headers. All supported platforms set at least one of those macros,
219+
# so no per-target byte-order copt is required here.
220+
"sha1.c",
221+
"ws.c",
201222
],
202223
hdrs = EVENT_EXTRA_PUBLIC_HEADERS,
203224
includes = ["include"],
@@ -213,12 +234,8 @@ cc_library(
213234
":event_core",
214235
":event_core_private_headers",
215236
":event_extra_private_headers",
216-
] + select({
217-
"@platforms//os:windows": [
218-
"//compat",
219-
],
220-
"//conditions:default": [],
221-
}),
237+
"//compat",
238+
],
222239
)
223240

224241
cc_library(
@@ -229,16 +246,17 @@ cc_library(
229246
":event_core",
230247
":event_extra",
231248
] + select({
232-
"@platforms//os:linux": [":event_pthreads"],
233-
"@platforms//os:macos": [":event_pthreads"],
234-
"//conditions:default": [],
249+
"@platforms//os:windows": [],
250+
"//conditions:default": [":event_pthreads"],
235251
}),
236252
)
237253

238254
cc_library(
239255
name = "event_openssl_private_headers",
240256
hdrs = [
257+
"mbedtls-compat.h",
241258
"openssl-compat.h",
259+
"ssl-compat.h",
242260
],
243261
tags = [
244262
"requires_openssl",
@@ -256,6 +274,7 @@ cc_library(
256274
name = "event_openssl",
257275
srcs = [
258276
"bufferevent_openssl.c",
277+
"bufferevent_ssl.c",
259278
],
260279
includes = ["include"],
261280
tags = [
@@ -274,15 +293,13 @@ cc_library(
274293
cc_library(
275294
name = "event_pthreads",
276295
srcs = select({
277-
"@platforms//os:linux": ["evthread_pthread.c"],
278-
"@platforms//os:macos": ["evthread_pthread.c"],
279-
"//conditions:default": [],
296+
"@platforms//os:windows": [],
297+
"//conditions:default": ["evthread_pthread.c"],
280298
}),
281299
includes = ["include"],
282300
linkopts = select({
283-
"@platforms//os:linux": ["-pthread"],
284-
"@platforms//os:macos": ["-pthread"],
285-
"//conditions:default": [],
301+
"@platforms//os:windows": [],
302+
"//conditions:default": ["-pthread"],
286303
}),
287304
visibility = ["//visibility:public"],
288305
deps = [

modules/libevent/release-2.2.2-alpha.envoy/overlay/WIN32-Code/BUILD.bazel renamed to modules/libevent/2.2.2-alpha.envoy/overlay/WIN32-Code/BUILD.bazel

File renamed without changes.

modules/libevent/release-2.2.2-alpha.envoy/overlay/compat/BUILD.bazel renamed to modules/libevent/2.2.2-alpha.envoy/overlay/compat/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ cc_library(
88
name = "compat",
99
hdrs = [
1010
"sys/queue.h",
11+
"sys/tree.h",
1112
],
1213
includes = ["."],
1314
)

modules/libevent/release-2.2.2-alpha.envoy/overlay/evconfig-private.h renamed to modules/libevent/2.2.2-alpha.envoy/overlay/evconfig-private.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#ifndef EVCONFIG_PRIVATE_H_INCLUDED_
22
#define EVCONFIG_PRIVATE_H_INCLUDED_
33

4-
#if defined(__linux__)
4+
#if defined(__ANDROID__)
5+
#include "evconfig-private_android.h"
6+
#elif defined(__linux__)
57
#include "evconfig-private_linux.h"
68
#elif defined(__APPLE__)
79
#include "evconfig-private_apple.h"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
#ifndef EVCONFIG_PRIVATE_ANDROID_H_INCLUDED_
3+
#define EVCONFIG_PRIVATE_ANDROID_H_INCLUDED_
4+
5+
/* Android is Linux-based; the private config is identical. */
6+
#include "evconfig-private_linux.h"
7+
8+
#endif // EVCONFIG_PRIVATE_ANDROID_H_INCLUDED_

modules/libevent/release-2.2.2-alpha.envoy/overlay/evconfig-private_apple.h renamed to modules/libevent/2.2.2-alpha.envoy/overlay/evconfig-private_apple.h

File renamed without changes.

modules/libevent/release-2.2.2-alpha.envoy/overlay/evconfig-private_linux.h renamed to modules/libevent/2.2.2-alpha.envoy/overlay/evconfig-private_linux.h

File renamed without changes.

0 commit comments

Comments
 (0)