openntpd: try to reset transient resolver failures in glibc.

This commit is contained in:
Christian Neukirchen 2015-08-24 16:34:04 +02:00
parent 1e57b1d7d6
commit 754116d14d
2 changed files with 24 additions and 1 deletions

View file

@ -0,0 +1,23 @@
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 */

View file

@ -1,7 +1,7 @@
# Template file for 'openntpd'
pkgname=openntpd
version=5.7p4
revision=7
revision=8
build_pie=yes
build_style=gnu-configure
configure_args="--with-privsep-user=$pkgname --with-cacert=/etc/ssl/certs.pem"