[Git][NTPsec/ntpsec][master] Only call res_init() if the configuration system detects support for it

Matt Selsky gitlab at mg.gitlab.com
Thu Feb 7 16:49:06 UTC 2019


Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
12c59191 by Matt Selsky at 2019-02-07T14:01:47Z
Only call res_init() if the configuration system detects support for it

- - - - -


1 changed file:

- ntpd/nts_client.c


Changes:

=====================================
ntpd/nts_client.c
=====================================
@@ -9,9 +9,11 @@
 
 #include <unistd.h>
 
+#ifdef HAVE_RES_INIT
 #include <netinet/in.h>
 #include <arpa/nameser.h>
 #include <resolv.h>
+#endif
 
 #include <openssl/ssl.h>
 
@@ -73,7 +75,9 @@ int open_TCP_socket(const char *hostname) {
   int gai_rc, err;
   int sockfd;
 
+#ifdef HAVE_RES_INIT
   res_init();
+#endif
 
   ZERO(hints);
   hints.ai_protocol = IPPROTO_TCP;



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/12c59191001232609376c0853aa07752557cc7a8

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/12c59191001232609376c0853aa07752557cc7a8
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20190207/c5c19b97/attachment.html>


More information about the vc mailing list