Skip to content

Commit 03e056e

Browse files
luke-jrfanquake
authored andcommitted
depends: Patch libevent build to fix IPv6 -rpcbind on Windows
libevent uses getaddrinfo when available, and falls back to gethostbyname Windows has both, but gethostbyname only supports IPv4 libevent fails to detect Windows's getaddrinfo due to not including the right headers This patches libevent's configure script to check it correctly
1 parent 67881de commit 03e056e

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

depends/packages/libevent.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ $(package)_version=2.1.11-stable
33
$(package)_download_path=https://github.com/libevent/libevent/archive/
44
$(package)_file_name=release-$($(package)_version).tar.gz
55
$(package)_sha256_hash=229393ab2bf0dc94694f21836846b424f3532585bac3468738b7bf752c03901e
6+
$(package)_patches=0001-fix-windows-getaddrinfo.patch
67

78
define $(package)_preprocess_cmds
9+
patch -p1 < $($(package)_patch_dir)/0001-fix-windows-getaddrinfo.patch && \
810
./autogen.sh
911
endef
1012

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff -ur libevent-2.1.8-stable.orig/configure.ac libevent-2.1.8-stable/configure.ac
2+
--- libevent-2.1.8-stable.orig/configure.ac 2017-01-29 17:51:00.000000000 +0000
3+
+++ libevent-2.1.8-stable/configure.ac 2020-03-07 01:11:16.311335005 +0000
4+
@@ -389,6 +389,10 @@
5+
#ifdef HAVE_NETDB_H
6+
#include <netdb.h>
7+
#endif
8+
+#ifdef _WIN32
9+
+#include <winsock2.h>
10+
+#include <ws2tcpip.h>
11+
+#endif
12+
]],
13+
[[
14+
getaddrinfo;
15+
Only in libevent-2.1.8-stable: configure.ac~

0 commit comments

Comments
 (0)