diff --git a/ports/libevent/libevent.patch b/ports/libevent/libevent.patch index cb8a021b..91a3cf73 100644 --- a/ports/libevent/libevent.patch +++ b/ports/libevent/libevent.patch @@ -81,6 +81,33 @@ diff -Paur --no-dereference -- libevent.upstream/configure libevent/configure ; return 0; } +diff -Paur --no-dereference -- libevent.upstream/evutil.c libevent/evutil.c +--- libevent.upstream/evutil.c ++++ libevent/evutil.c +@@ -76,8 +76,10 @@ + #include + #include + #ifndef _WIN32 ++#if __has_include() + #include + #endif ++#endif + #ifdef EVENT__HAVE_IFADDRS_H + #include + #endif +@@ -2007,7 +2009,12 @@ + if (cp == NULL) + return evutil_inet_pton(af, src, dst); + ++#if __has_include() + if_index = if_nametoindex(cp + 1); ++#else ++ if_index = 0; ++ errno = ENODEV; ++#endif + if (if_index == 0) { + /* Could be numeric */ + if_index = strtoul(cp + 1, &check, 10); diff -Paur --no-dereference -- libevent.upstream/evutil_rand.c libevent/evutil_rand.c --- libevent.upstream/evutil_rand.c +++ libevent/evutil_rand.c