libbind's version of netdb.h has ai_addr and ai_canonname the wrong way
round compared to the one in base; swap them, fixing a failure with net/bro in cluster mode tracked down by Matt Dunwoodie. ok aja@ (libbind is the BIND resolver used in very few specialist cases where the resolver in base isn't compatible enough - previously used for mtr but now it's only used by bro. I am still quietly hoping that bro will switch to another resolver library sometime and we can remove this hack of a port again :-)
This commit is contained in:
parent
a5af42f795
commit
45750beeb4
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.21 2019/06/03 16:06:53 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.22 2019/07/15 08:47:45 sthen Exp $
|
||||
|
||||
COMMENT= BIND stub resolver library for special use cases
|
||||
|
||||
@ -13,9 +13,9 @@ COMMENT= BIND stub resolver library for special use cases
|
||||
V= 6.0
|
||||
DISTNAME= libbind-6.0
|
||||
EPOCH= 0
|
||||
REVISION= 4
|
||||
REVISION= 5
|
||||
|
||||
SHARED_LIBS += bind 5.0 # 6.1
|
||||
SHARED_LIBS += bind 6.0 # 6.1
|
||||
|
||||
CATEGORIES= net
|
||||
|
||||
|
17
net/libbind/patches/patch-include_netdb_h
Normal file
17
net/libbind/patches/patch-include_netdb_h
Normal file
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-include_netdb_h,v 1.1 2019/07/15 08:47:45 sthen Exp $
|
||||
|
||||
struct needs to match the order in base. (We can't just directly use
|
||||
netdb.h from base because it is missing things that libbind wants).
|
||||
|
||||
Index: include/netdb.h
|
||||
--- include/netdb.h.orig
|
||||
+++ include/netdb.h
|
||||
@@ -182,7 +182,7 @@ struct addrinfo {
|
||||
#else
|
||||
size_t ai_addrlen; /*%< length of ai_addr */
|
||||
#endif
|
||||
-#ifdef __linux
|
||||
+#if defined(__linux) || defined(__OpenBSD__)
|
||||
struct sockaddr *ai_addr; /*%< binary address */
|
||||
char *ai_canonname; /*%< canonical name for hostname */
|
||||
#else
|
Loading…
Reference in New Issue
Block a user