aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-02-09 21:28:10 -0600
committerWilliam Pitcock <nenolod@dereferenced.org>2018-02-10 03:28:43 +0000
commitd217b5aeab4856e115387b6a990040098923d898 (patch)
tree0b4ce80018f0c78385d1f6fa364a8c1fd03b07d3
parent9f6381a08068034971dc4750779ffd817dc7ecfe (diff)
downloadaports-d217b5aeab4856e115387b6a990040098923d898.tar.bz2
aports-d217b5aeab4856e115387b6a990040098923d898.tar.xz
main/musl: Fix __lookup_serv error code value
-rw-r--r--main/musl/2003-__lookup_serv-return-correct-error-code.patch28
-rw-r--r--main/musl/APKBUILD4
2 files changed, 31 insertions, 1 deletions
diff --git a/main/musl/2003-__lookup_serv-return-correct-error-code.patch b/main/musl/2003-__lookup_serv-return-correct-error-code.patch
new file mode 100644
index 0000000000..db60da0e08
--- /dev/null
+++ b/main/musl/2003-__lookup_serv-return-correct-error-code.patch
@@ -0,0 +1,28 @@
+From 1b235305d35c3adc7a0d1bbc3943fac1ef84aab6 Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Thu, 14 Sep 2017 15:50:52 -0500
+Subject: [PATCH] __lookup_serv: return correct error code
+
+If AI_NUMERICSERV is specified and a numeric service was not provided,
+POSIX mandates getaddrinfo return EAI_NONAME. EAI_SERVICE is only for
+services that cannot be used on the specified socket type.
+---
+ src/network/lookup_serv.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/network/lookup_serv.c b/src/network/lookup_serv.c
+index 66ebaea..403b12a 100644
+--- a/src/network/lookup_serv.c
++++ b/src/network/lookup_serv.c
+@@ -64,7 +64,7 @@ int __lookup_serv(struct service buf[static MAXSERVS], const char *name, int pro
+ return cnt;
+ }
+
+- if (flags & AI_NUMERICSERV) return EAI_SERVICE;
++ if (flags & AI_NUMERICSERV) return EAI_NONAME;
+
+ size_t l = strlen(name);
+
+--
+2.10.0
+
diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD
index 643175dc26..c3cb17f338 100644
--- a/main/musl/APKBUILD
+++ b/main/musl/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=musl
pkgver=1.1.18
-pkgrel=6
+pkgrel=7
pkgdesc="the musl c library (libc) implementation"
url="http://www.musl-libc.org/"
arch="all"
@@ -22,6 +22,7 @@ source="http://www.musl-libc.org/releases/musl-$pkgver.tar.gz
0001-track-pthread-stack-guard-sizes.patch
1000-implement-strftime-GNU-extension-padding-specifiers-.patch
2000-pthread-internals-increase-DEFAULT_GUARD_SIZE-to-2-p.patch
+ 2003-__lookup_serv-return-correct-error-code.patch
3002-stdio-implement-fopencookie-3.patch
ldconfig
@@ -152,6 +153,7 @@ c28abac671f531d200bd1ebc934fc57b1c04404e49237dd6cfde4fe72e4fd8b855df0e75f76d62ec
455ad7f2d7c32af536d47c9fcfbfcb259aceb07c461b8c0bb26466b2210ea58e343f3b3e34c50bb945da9206866c6fc70b6aa73402c06b558abba8108b3ce630 0001-track-pthread-stack-guard-sizes.patch
7e4c703e57a3564cd3ee1d5334b806cbe654355179ba55d4d25361dfc555eb4a7d081d80d64fdaff8476949afd04558d278b124d1fb108080beaa5ba2f8ce2b9 1000-implement-strftime-GNU-extension-padding-specifiers-.patch
2c8e1dde1834238097b2ee8a7bfb53471a0d9cff4a5e38b55f048b567deff1cdd47c170d0578a67b1a039f95a6c5fbb8cff369c75b6a3e4d7ed171e8e86ebb8c 2000-pthread-internals-increase-DEFAULT_GUARD_SIZE-to-2-p.patch
+0155098b94b61e8d9f01ba1a8a80b9c030bf289f02d9e4db92b2638d0d3f589150fada1a6bdb97be14ca7bcca2221937826923343736303ebdb301b908db4d32 2003-__lookup_serv-return-correct-error-code.patch
bdc6fe197779088507d6f8bb72560239f908a635b39eb677bfcf91da28b92ee52b67696e627dad08ccb8a7dcaf7a72b574276098fb3fddd4a6b646a0f0799785 3002-stdio-implement-fopencookie-3.patch
8d3a2d5315fc56fee7da9abb8b89bb38c6046c33d154c10d168fb35bfde6b0cf9f13042a3bceee34daf091bc409d699223735dcf19f382eeee1f6be34154f26f ldconfig
062bb49fa54839010acd4af113e20f7263dde1c8a2ca359b5fb2661ef9ed9d84a0f7c3bc10c25dcfa10bb3c5a4874588dff636ac43d5dbb3d748d75400756d0b __stack_chk_fail_local.c