~alpine/aports

testing/libasr: fix incorrect #define which caused all queries to fail v1 PROPOSED

Jonathan Curran: 1
 testing/libasr: fix incorrect #define which caused all queries to fail

 2 files changed, 14 insertions(+), 5 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.alpinelinux.org/~alpine/aports/patches/1164/mbox | git am -3
Learn more about email & git

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

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
@@ -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
@@ -745,6 +745,15 @@ struct winsize {
@@ -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)
@@ -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
@@ -2,7 +2,7 @@
# Maintainer: Francesco Colista <fcolista@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"
@@ -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@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---