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

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