Mail archive
alpine-aports

[alpine-aports] [PATCH] testing/libasr: fix incorrect #define which caused all queries to fail

From: Jonathan Curran <jonathan_at_curran.in>
Date: Wed, 9 Sep 2015 17:39:13 +0000

I was testing this library with the upcoming OpenSMTPD aport that I am
creating. All dns queries were failing. Upon investigation I found
that NETDB_SUCCESS in libasr/src/openbsd-compat/defines.h had an
incorrect value of -1 being set (it was being defined since
NETDB_SUCCESS is not present in musl).
---
 testing/libasr/00-use-openbsd-res_randomid.patch | 11 ++++++++++-
 testing/libasr/APKBUILD                          |  8 ++++----
 2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/testing/libasr/00-use-openbsd-res_randomid.patch b/testing/libasr/00-use-openbsd-res_randomid.patch
index c1bd6a7..4fb9782 100644
--- a/testing/libasr/00-use-openbsd-res_randomid.patch
+++ b/testing/libasr/00-use-openbsd-res_randomid.patch
_at_@ -584,7 +584,7 @@ index 0000000..7c3680f
 +  }
 +}
 diff --git a/openbsd-compat/defines.h b/openbsd-compat/defines.h
-index da7a42c..e79ef51 100644
+index da7a42c..b734c90 100644
 --- a/openbsd-compat/defines.h
 +++ b/openbsd-compat/defines.h
 _at_@ -745,6 +745,15 @@ struct winsize {
_at_@ -603,6 +603,15 @@ index da7a42c..e79ef51 100644
  #ifndef HAVE_VA_COPY
  # ifdef HAVE___VA_COPY
  #  define va_copy(dest, src) __va_copy(dest, src)
+_at_@ -823,7 +832,7 @@ struct winsize {
+ #endif
+ 
+ #ifndef NETDB_SUCCESS
+-# define NETDB_SUCCESS -1
++# define NETDB_SUCCESS 0
+ #endif
+ 
+ /* end of chl */
 diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
 index c30591c..7baccc8 100644
 --- a/openbsd-compat/openbsd-compat.h
diff --git a/testing/libasr/APKBUILD b/testing/libasr/APKBUILD
index d516c79..3e99024 100644
--- a/testing/libasr/APKBUILD
+++ b/testing/libasr/APKBUILD
_at_@ -2,7 +2,7 @@
 # Maintainer: Francesco Colista <fcolista_at_alpinelinux.org>
 pkgname=libasr
 pkgver=1.0.2
-pkgrel=1
+pkgrel=2
 pkgdesc="libasr is a free, simple and portable asynchronous resolver library"
 url="http://www.opensmtpd.org"
 arch="all"
_at_@ -46,8 +46,8 @@ package() {
 }
 
 md5sums="1919b1b1c5a08821901fd2c0a6d488a7  libasr-1.0.2.zip
-7d0cacd365ae27209172e64d006545f5  00-use-openbsd-res_randomid.patch"
+2d32d1f831dc000137d5fcaf9db3e33f  00-use-openbsd-res_randomid.patch"
 sha256sums="8e1ed7420446219d105ac0c384cf69160791335dc69bf1ca0581279472241ca7  libasr-1.0.2.zip
-416cd9151ebf6de148b7f57b0a2ee0539fca0dbe5ee6a8a33ac854ceaccf58e4  00-use-openbsd-res_randomid.patch"
+19ad3fe95f881b60c317ec63777c1b4843dbaea39d28343eb67c5bdbabe4e5f9  00-use-openbsd-res_randomid.patch"
 sha512sums="2b9185c9bd953d093be397554bc024ddab03003e0c56f19018a8bc22d48434fe3364274fef631cd5e2984321368baff4cd4a504d61b71c60ceffd9e5cc3c8124  libasr-1.0.2.zip
-80a90726cb556339b70b4f39e8b0525e6759f7230b17c38c6813329aeb6616caca3370ef8ef538c05ea8acc5fd0e1015a5d37b300947019fd550bb3695c0c931  00-use-openbsd-res_randomid.patch"
+2dd30b5147562f209b23b4a939be787304125cf559bccd937781149cc7cb487c4cf6ec358fba32a33407c7ca3e44545ebbe04ddc2a14504835409f23bdef9689  00-use-openbsd-res_randomid.patch"
-- 
2.4.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Wed Sep 09 2015 - 17:39:13 GMT