Browse Source

FreeBSD compatibility fixes

EAI_NODATA has been made obsolete.
Properly detect MD5Init in -lmd
OPENBSD_5_7
Brent Cook 9 years ago
parent
commit
074a8e3928
2 changed files with 24 additions and 5 deletions
  1. +20
    -3
      config.patch
  2. +4
    -2
      configure.ac

+ 20
- 3
config.patch View File

@ -1,5 +1,5 @@
--- config.orig 2014-12-28 12:15:23.139241646 -0600
+++ config.c 2014-12-28 12:15:58.843242420 -0600
--- config.orig Sun Dec 28 20:17:46 2014
+++ config.c Sun Dec 28 20:19:48 2014
@@ -75,7 +75,9 @@
if ((h = calloc(1, sizeof(struct ntp_addr))) == NULL)
fatal(NULL);
@ -20,7 +20,24 @@
sa_in6->sin6_family = AF_INET6;
memcpy(&sa_in6->sin6_addr,
&((struct sockaddr_in6 *)res->ai_addr)->sin6_addr,
@@ -141,12 +145,16 @@
@@ -124,8 +128,14 @@
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM; /* DUMMY */
error = getaddrinfo(s, NULL, &hints, &res0);
- if (error == EAI_AGAIN || error == EAI_NODATA || error == EAI_NONAME)
- return (0);
+ switch (error) {
+ case EAI_AGAIN:
+#ifdef EAI_NODATA
+ case EAI_NODATA:
+#endif
+ case EAI_NONAME:
+ return (0);
+ }
if (error) {
log_warnx("could not parse \"%s\": %s", s,
gai_strerror(error));
@@ -141,12 +151,16 @@
h->ss.ss_family = res->ai_family;
if (res->ai_family == AF_INET) {
sa_in = (struct sockaddr_in *)&h->ss;


+ 4
- 2
configure.ac View File

@ -93,7 +93,8 @@ AC_CHECK_FUNC([ibuf_open],,
# Share test results with automake
AM_CONDITIONAL([HAVE_ADJFREQ], [test "x$ac_cv_func_adjfreq" = xyes])
AM_CONDITIONAL([HAVE_ARC4RANDOM], [test "x$ac_cv_func_arc4random" = xyes])
AM_CONDITIONAL([HAVE_ARC4RANDOM],
[test "x$ac_cv_func_arc4random" = xyes -o "ac_cv_search_arc4random" != xno])
AM_CONDITIONAL([HAVE_ARC4RANDOM_UNIFORM], [test "x$ac_cv_func_arc4random_uniform" = xyes])
AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes])
AM_CONDITIONAL([HAVE_EXPLICIT_BZERO], [test "x$ac_cv_func_explicit_bzero" = xyes])
@ -108,7 +109,8 @@ AM_CONDITIONAL([HAVE_STRLCPY], [test "x$ac_cv_func_strlcpy" = xyes])
AM_CONDITIONAL([HAVE_STRNDUP], [test "x$ac_cv_func_strndup" = xyes])
AM_CONDITIONAL([HAVE_STRNLEN], [test "x$ac_cv_func_strnlen" = xyes])
AM_CONDITIONAL([HAVE_STRTONUM], [test "x$ac_cv_func_strtonum" = xyes])
AM_CONDITIONAL([HAVE_MD5], [test "x$ac_cv_func_MD5Init" = xyes])
AM_CONDITIONAL([HAVE_MD5],
[test "x$ac_cv_func_MD5Init" = xyes -o "ac_cv_search_MD5Init" != xno])
AM_CONDITIONAL([HAVE_SHA512], [test "x$ac_cv_func_SHA512Init" = xyes])
AM_CONDITIONAL([HAVE_IMSG], [test "x$ac_cv_func_ibuf_open" = xyes])


Loading…
Cancel
Save