aboutsummaryrefslogtreecommitdiffstats
path: root/kqueue.c
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2020-07-14 18:31:56 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-07-14 18:31:56 +0000
commit884d7a39094e590c9dc58f865b068f40694c6a49 (patch)
tree53915fc3eafdda183ab94c84e85ad7d7107afc6a /kqueue.c
parentc4d7c4bdab4c5587b42073d60fb6aca6e335d76e (diff)
parent023ea039b9fada42e0cbbefcd75858a855a6130a (diff)
downloadplatform_external_libevent-master.tar.gz
platform_external_libevent-master.tar.bz2
platform_external_libevent-master.zip
Upgrade libevent to release-2.1.12-stable am: f0077b80a0 am: 023ea039b9HEADmaster
Original change: https://android-review.googlesource.com/c/platform/external/libevent/+/1360893 Change-Id: Iee716ec96a55737a04463c7b84c929c2e6418c54
Diffstat (limited to 'kqueue.c')
-rw-r--r--kqueue.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kqueue.c b/kqueue.c
index d08f512..dfd7751 100644
--- a/kqueue.c
+++ b/kqueue.c
@@ -51,7 +51,10 @@
/* Some platforms apparently define the udata field of struct kevent as
* intptr_t, whereas others define it as void*. There doesn't seem to be an
* easy way to tell them apart via autoconf, so we need to use OS macros. */
-#if defined(EVENT__HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__darwin__) && !defined(__APPLE__) && !defined(__CloudABI__)
+#if defined(__NetBSD__)
+#define PTR_TO_UDATA(x) ((typeof(((struct kevent *)0)->udata))(x))
+#define INT_TO_UDATA(x) ((typeof(((struct kevent *)0)->udata))(intptr_t)(x))
+#elif defined(EVENT__HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__darwin__) && !defined(__APPLE__) && !defined(__CloudABI__)
#define PTR_TO_UDATA(x) ((intptr_t)(x))
#define INT_TO_UDATA(x) ((intptr_t)(x))
#else