diff options
author | schmonz <schmonz@pkgsrc.org> | 2018-12-17 19:24:44 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2018-12-17 19:24:44 +0000 |
commit | d7c5768d42b9c3dfce6f4c4e4f10c616505b34c2 (patch) | |
tree | af1c3b99d6581ccefa9783de9465abb9c97ebb08 /mail | |
parent | 2d5f615801430fcd888b9097de6e3f8c0c88bd96 (diff) | |
download | pkgsrc-d7c5768d42b9c3dfce6f4c4e4f10c616505b34c2.tar.gz |
Add proper autoconfery for res_close(), from maya@ (thanks!).
Diffstat (limited to 'mail')
-rw-r--r-- | mail/libspf2/distinfo | 7 | ||||
-rw-r--r-- | mail/libspf2/patches/patch-configure | 41 | ||||
-rw-r--r-- | mail/libspf2/patches/patch-configure.ac | 30 | ||||
-rw-r--r-- | mail/libspf2/patches/patch-src_libspf2_spf__dns__resolv.c | 13 |
4 files changed, 78 insertions, 13 deletions
diff --git a/mail/libspf2/distinfo b/mail/libspf2/distinfo index 712bb6baa35..eda97c1429d 100644 --- a/mail/libspf2/distinfo +++ b/mail/libspf2/distinfo @@ -1,11 +1,12 @@ -$NetBSD: distinfo,v 1.10 2018/12/17 18:32:42 schmonz Exp $ +$NetBSD: distinfo,v 1.11 2018/12/17 19:24:44 schmonz Exp $ SHA1 (libspf2-1.2.10.tar.gz) = 3c31b20c737d9a8044440e5bf25697016b9cb582 RMD160 (libspf2-1.2.10.tar.gz) = 5557435802896bec31362c1fa028e9e295656455 SHA512 (libspf2-1.2.10.tar.gz) = 162ce382628c6fcadac3e11f5a12442db622bb23f7ec503e16f5ba7fc88afdd777bce6b093c12a58210355985fd11b74b140f08fab347334d82d953dd183b130 Size (libspf2-1.2.10.tar.gz) = 508842 bytes -SHA1 (patch-configure) = 4457ad150c192031f5db020cfd10110f7e4f28b1 +SHA1 (patch-configure) = 0005180f6b9aedc45663dee6764c438d33078359 +SHA1 (patch-configure.ac) = eb0fae2a2bbe86f0e54b56c3ab2ec696f9a6788c SHA1 (patch-src_include_spf__log.h) = 87b534d338b7fa36168cf8b745a285e38598cfed SHA1 (patch-src_libreplace_Makefile.in) = 12fab6f97efff6cc1944ebb5a5cf26fdb79971c2 SHA1 (patch-src_libreplace_ensure__libreplace__symbol.c) = 1b2ccf11fe7cade3c7769e7388cdd79ee250b26e -SHA1 (patch-src_libspf2_spf__dns__resolv.c) = 493449b294afa3154b8656d2155d3b144393d02c +SHA1 (patch-src_libspf2_spf__dns__resolv.c) = b704c82f6627154470b07763d2233923bf0f6b10 diff --git a/mail/libspf2/patches/patch-configure b/mail/libspf2/patches/patch-configure index ef13df1d9e2..6a600c2732d 100644 --- a/mail/libspf2/patches/patch-configure +++ b/mail/libspf2/patches/patch-configure @@ -1,10 +1,45 @@ -$NetBSD: patch-configure,v 1.3 2013/07/06 11:09:26 tron Exp $ +$NetBSD: patch-configure,v 1.4 2018/12/17 19:24:44 schmonz Exp $ Ensure that libreplace contains at least one symbol. +test for res_close, not available in OpenBSD --- configure.orig 2012-02-20 07:31:46.000000000 +0000 -+++ configure 2013-07-06 11:54:48.000000000 +0100 -@@ -13577,7 +13577,7 @@ ++++ configure +@@ -13494,6 +13494,33 @@ cat >>confdefs.h <<_ACEOF + #define HAVE_DECL_RES_NDESTROY $ac_have_decl + _ACEOF + ++ac_fn_c_check_decl "$LINENO" "res_close" "ac_cv_have_decl_res_close" " ++ #ifdef HAVE_SYS_TYPES_H ++ # include <sys/types.h> ++ #endif ++ #ifdef HAVE_SYS_SOCKET_H ++ # include <sys/socket.h> /* inet_ functions / structs */ ++ #endif ++ #ifdef HAVE_NETINET_IN_H ++ # include <netinet/in.h> /* inet_ functions / structs */ ++ #endif ++ #ifdef HAVE_ARPA_NAMESER_H ++ # include <arpa/nameser.h> /* DNS HEADER struct */ ++ #endif ++ #ifdef HAVE_RESOLV_H ++ # include <resolv.h> ++ #endif ++ ++" ++if test "x$ac_cv_have_decl_res_close" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_RES_CLOSE $ac_have_decl ++_ACEOF + + ac_fn_c_check_decl "$LINENO" "ns_t_spf" "ac_cv_have_decl_ns_t_spf" " + #ifdef HAVE_SYS_TYPES_H +@@ -13577,7 +13604,7 @@ _ACEOF fi done diff --git a/mail/libspf2/patches/patch-configure.ac b/mail/libspf2/patches/patch-configure.ac new file mode 100644 index 00000000000..138971da27e --- /dev/null +++ b/mail/libspf2/patches/patch-configure.ac @@ -0,0 +1,30 @@ +$NetBSD: patch-configure.ac,v 1.1 2018/12/17 19:24:44 schmonz Exp $ + +Test for res_close, not available in OpenBSD. + +--- configure.ac.orig 2012-02-20 07:30:42.000000000 +0000 ++++ configure.ac +@@ -231,6 +231,23 @@ AC_CHECK_DECLS([res_ndestroy], [], [], [ + # include <resolv.h> + #endif + ]]) ++AC_CHECK_DECLS([res_close], [], [], [[ ++ #ifdef HAVE_SYS_TYPES_H ++ # include <sys/types.h> ++ #endif ++ #ifdef HAVE_SYS_SOCKET_H ++ # include <sys/socket.h> /* inet_ functions / structs */ ++ #endif ++ #ifdef HAVE_NETINET_IN_H ++ # include <netinet/in.h> /* inet_ functions / structs */ ++ #endif ++ #ifdef HAVE_ARPA_NAMESER_H ++ # include <arpa/nameser.h> /* DNS HEADER struct */ ++ #endif ++ #ifdef HAVE_RESOLV_H ++ # include <resolv.h> ++ #endif ++ ]]) + + AC_CHECK_DECLS([ns_t_spf], [], [], [[ + #ifdef HAVE_SYS_TYPES_H diff --git a/mail/libspf2/patches/patch-src_libspf2_spf__dns__resolv.c b/mail/libspf2/patches/patch-src_libspf2_spf__dns__resolv.c index 3a3bd122f6d..6ade1a055a5 100644 --- a/mail/libspf2/patches/patch-src_libspf2_spf__dns__resolv.c +++ b/mail/libspf2/patches/patch-src_libspf2_spf__dns__resolv.c @@ -1,16 +1,15 @@ -$NetBSD: patch-src_libspf2_spf__dns__resolv.c,v 1.1 2018/12/17 18:32:42 schmonz Exp $ +$NetBSD: patch-src_libspf2_spf__dns__resolv.c,v 1.2 2018/12/17 19:24:44 schmonz Exp $ OpenBSD's libc resolver provides res_init() but not res_close(). ---- src/libspf2/spf_dns_resolv.c.orig Sat Jan 28 08:24:47 2012 +--- src/libspf2/spf_dns_resolv.c.orig 2012-01-28 08:24:47.000000000 +0000 +++ src/libspf2/spf_dns_resolv.c -@@ -607,7 +607,9 @@ SPF_dns_resolv_free(SPF_dns_server_t *spf_dns_server) +@@ -606,7 +606,7 @@ SPF_dns_resolv_free(SPF_dns_server_t *sp + { SPF_ASSERT_NOTNULL(spf_dns_server); - #if ! HAVE_DECL_RES_NINIT -+# ifndef __OpenBSD__ +-#if ! HAVE_DECL_RES_NINIT ++#if HAVE_DECL_RES_CLOSE res_close(); -+# endif #endif - free(spf_dns_server); |