void-packages/srcpkgs/openntpd/patches/resinit.patch
2015-08-24 16:34:17 +02:00

23 lines
606 B
Diff

Reset transient resolver failures in glibc
https://github.com/openntpd-portable/openntpd-portable/issues/12
--- src/config.c.orig 2015-08-24 16:29:04.396307991 +0200
+++ src/config.c 2015-08-24 16:29:27.791193789 +0200
@@ -23,6 +23,7 @@
#include <netinet/in.h>
#include <errno.h>
+#include <resolv.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -132,6 +133,9 @@
struct sockaddr_in6 *sa_in6;
struct ntp_addr *h, *hh = NULL;
+#ifdef __GLIBC__
+ res_init();
+#endif
bzero(&hints, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM; /* DUMMY */