Received: by mail.netbsd.org (Postfix, from userid 605) id 13EAB84DE1; Mon, 17 Dec 2018 19:24:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 05CBB84DE2 for ; Mon, 17 Dec 2018 19:24:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id xi-Pcya9j3rd for ; Mon, 17 Dec 2018 19:24:45 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id E698184C81 for ; Mon, 17 Dec 2018 19:24:44 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id E0287FB16; Mon, 17 Dec 2018 19:24:44 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1545074684121910" MIME-Version: 1.0 Date: Mon, 17 Dec 2018 19:24:44 +0000 From: "Amitai Schleier" Subject: CVS commit: pkgsrc/mail/libspf2 To: pkgsrc-changes@NetBSD.org Reply-To: schmonz@netbsd.org X-Mailer: log_accum Message-Id: <20181217192444.E0287FB16@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1545074684121910 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: schmonz Date: Mon Dec 17 19:24:44 UTC 2018 Modified Files: pkgsrc/mail/libspf2: distinfo pkgsrc/mail/libspf2/patches: patch-configure patch-src_libspf2_spf__dns__resolv.c Added Files: pkgsrc/mail/libspf2/patches: patch-configure.ac Log Message: Add proper autoconfery for res_close(), from maya@ (thanks!). To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 pkgsrc/mail/libspf2/distinfo cvs rdiff -u -r1.3 -r1.4 pkgsrc/mail/libspf2/patches/patch-configure cvs rdiff -u -r0 -r1.1 pkgsrc/mail/libspf2/patches/patch-configure.ac cvs rdiff -u -r1.1 -r1.2 \ pkgsrc/mail/libspf2/patches/patch-src_libspf2_spf__dns__resolv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1545074684121910 Content-Disposition: inline Content-Length: 5342 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/mail/libspf2/distinfo diff -u pkgsrc/mail/libspf2/distinfo:1.10 pkgsrc/mail/libspf2/distinfo:1.11 --- pkgsrc/mail/libspf2/distinfo:1.10 Mon Dec 17 18:32:42 2018 +++ pkgsrc/mail/libspf2/distinfo Mon Dec 17 19:24:44 2018 @@ -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 Index: pkgsrc/mail/libspf2/patches/patch-configure diff -u pkgsrc/mail/libspf2/patches/patch-configure:1.3 pkgsrc/mail/libspf2/patches/patch-configure:1.4 --- pkgsrc/mail/libspf2/patches/patch-configure:1.3 Sat Jul 6 11:09:26 2013 +++ pkgsrc/mail/libspf2/patches/patch-configure Mon Dec 17 19:24:44 2018 @@ -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 ++ #endif ++ #ifdef HAVE_SYS_SOCKET_H ++ # include /* inet_ functions / structs */ ++ #endif ++ #ifdef HAVE_NETINET_IN_H ++ # include /* inet_ functions / structs */ ++ #endif ++ #ifdef HAVE_ARPA_NAMESER_H ++ # include /* DNS HEADER struct */ ++ #endif ++ #ifdef HAVE_RESOLV_H ++ # include ++ #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 Index: pkgsrc/mail/libspf2/patches/patch-src_libspf2_spf__dns__resolv.c diff -u pkgsrc/mail/libspf2/patches/patch-src_libspf2_spf__dns__resolv.c:1.1 pkgsrc/mail/libspf2/patches/patch-src_libspf2_spf__dns__resolv.c:1.2 --- pkgsrc/mail/libspf2/patches/patch-src_libspf2_spf__dns__resolv.c:1.1 Mon Dec 17 18:32:42 2018 +++ pkgsrc/mail/libspf2/patches/patch-src_libspf2_spf__dns__resolv.c Mon Dec 17 19:24:44 2018 @@ -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); Added files: Index: pkgsrc/mail/libspf2/patches/patch-configure.ac diff -u /dev/null pkgsrc/mail/libspf2/patches/patch-configure.ac:1.1 --- /dev/null Mon Dec 17 19:24:44 2018 +++ pkgsrc/mail/libspf2/patches/patch-configure.ac Mon Dec 17 19:24:44 2018 @@ -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 + #endif + ]]) ++AC_CHECK_DECLS([res_close], [], [], [[ ++ #ifdef HAVE_SYS_TYPES_H ++ # include ++ #endif ++ #ifdef HAVE_SYS_SOCKET_H ++ # include /* inet_ functions / structs */ ++ #endif ++ #ifdef HAVE_NETINET_IN_H ++ # include /* inet_ functions / structs */ ++ #endif ++ #ifdef HAVE_ARPA_NAMESER_H ++ # include /* DNS HEADER struct */ ++ #endif ++ #ifdef HAVE_RESOLV_H ++ # include ++ #endif ++ ]]) + + AC_CHECK_DECLS([ns_t_spf], [], [], [[ + #ifdef HAVE_SYS_TYPES_H --_----------=_1545074684121910--