Blame SOURCES/0029-Use-system-getaddrinfo-for-dhcp.patch

f9ed25
From 019021caa791c254a319c71b4f634142dc14b37d Mon Sep 17 00:00:00 2001
f9ed25
From: Pavel Zhukov <pzhukov@redhat.com>
f9ed25
Date: Tue, 22 Jun 2021 06:58:40 +0200
f9ed25
Subject: [PATCH 29/29] Use system getaddrinfo for dhcp
f9ed25
Cc: pzhukov@redhat.com
f9ed25
f9ed25
---
f9ed25
 bind/bind/lib/irs/include/irs/netdb.h.in | 94 ++++++++++++++++++++++++
f9ed25
 1 file changed, 94 insertions(+)
f9ed25
f9ed25
diff --git a/bind/bind/lib/irs/include/irs/netdb.h.in b/bind/bind/lib/irs/include/irs/netdb.h.in
f9ed25
index 23dcd37..f36113d 100644
f9ed25
--- a/bind/bind/lib/irs/include/irs/netdb.h.in
f9ed25
+++ b/bind/bind/lib/irs/include/irs/netdb.h.in
f9ed25
@@ -149,6 +149,100 @@ struct addrinfo {
f9ed25
 #define	NI_NUMERICSERV	0x00000008
f9ed25
 #define	NI_DGRAM	0x00000010
f9ed25
 
f9ed25
+/*
f9ed25
+ * Define to map into irs_ namespace.
f9ed25
+ */
f9ed25
+
f9ed25
+#define IRS_NAMESPACE
f9ed25
+
f9ed25
+#ifdef IRS_NAMESPACE
f9ed25
+
f9ed25
+/*
f9ed25
+ * Use our versions not the ones from the C library.
f9ed25
+ */
f9ed25
+
f9ed25
+#ifdef getnameinfo
f9ed25
+#undef getnameinfo
f9ed25
+#endif
f9ed25
+#define getnameinfo irs_getnameinfo
f9ed25
+
f9ed25
+#ifdef getaddrinfo
f9ed25
+#undef getaddrinfo
f9ed25
+#endif
f9ed25
+#define getaddrinfo irs_getaddrinfo
f9ed25
+
f9ed25
+#ifdef freeaddrinfo
f9ed25
+#undef freeaddrinfo
f9ed25
+#endif
f9ed25
+#define freeaddrinfo irs_freeaddrinfo
f9ed25
+
f9ed25
+#ifdef gai_strerror
f9ed25
+#undef gai_strerror
f9ed25
+#endif
f9ed25
+#define gai_strerror irs_gai_strerror
f9ed25
+
f9ed25
+#endif
f9ed25
+
f9ed25
+extern int getaddrinfo (const char *name,
f9ed25
+			const char *service,
f9ed25
+			const struct addrinfo *req,
f9ed25
+			struct addrinfo **pai);
f9ed25
+extern int getnameinfo (const struct sockaddr *sa,
f9ed25
+			socklen_t salen, char *host,
f9ed25
+			socklen_t hostlen, char *serv,
f9ed25
+			socklen_t servlen, int flags);
f9ed25
+extern void freeaddrinfo (struct addrinfo *ai);
f9ed25
+extern const char *gai_strerror (int ecode);
f9ed25
+
f9ed25
+/*
f9ed25
+ * Define to map into irs_ namespace.
f9ed25
+ */
f9ed25
+
f9ed25
+#define IRS_NAMESPACE
f9ed25
+
f9ed25
+#ifdef IRS_NAMESPACE
f9ed25
+
f9ed25
+/*
f9ed25
+ * Use our versions not the ones from the C library.
f9ed25
+ */
f9ed25
+
f9ed25
+#ifdef getnameinfo
f9ed25
+#undef getnameinfo
f9ed25
+#endif
f9ed25
+#define getnameinfo irs_getnameinfo
f9ed25
+
f9ed25
+#ifdef getaddrinfo
f9ed25
+#undef getaddrinfo
f9ed25
+#endif
f9ed25
+#define getaddrinfo irs_getaddrinfo
f9ed25
+
f9ed25
+#ifdef freeaddrinfo
f9ed25
+#undef freeaddrinfo
f9ed25
+#endif
f9ed25
+#define freeaddrinfo irs_freeaddrinfo
f9ed25
+
f9ed25
+#ifdef gai_strerror
f9ed25
+#undef gai_strerror
f9ed25
+#endif
f9ed25
+#define gai_strerror irs_gai_strerror
f9ed25
+
f9ed25
+int
f9ed25
+getaddrinfo(const char *hostname, const char *servname,
f9ed25
+	    const struct addrinfo *hints, struct addrinfo **res);
f9ed25
+
f9ed25
+int
f9ed25
+getnameinfo(const struct sockaddr *sa, IRS_GETNAMEINFO_SOCKLEN_T salen,
f9ed25
+	    char *host, IRS_GETNAMEINFO_BUFLEN_T hostlen,
f9ed25
+	    char *serv, IRS_GETNAMEINFO_BUFLEN_T servlen,
f9ed25
+	    IRS_GETNAMEINFO_FLAGS_T flags);
f9ed25
+
f9ed25
+void freeaddrinfo (struct addrinfo *ai);
f9ed25
+
f9ed25
+IRS_GAISTRERROR_RETURN_T
f9ed25
+gai_strerror(int ecode);
f9ed25
+
f9ed25
+#endif
f9ed25
+
f9ed25
 /*
f9ed25
  * Tell Emacs to use C mode on this file.
f9ed25
  * Local variables:
f9ed25
-- 
f9ed25
2.26.3
f9ed25