Skip to content
Snippets Groups Projects
Verified Commit 6439b870 authored by alice's avatar alice
Browse files

community/libssh: fix strerror_r usage

parent 688c25db
No related branches found
No related tags found
1 merge request!39304[3.16] main/expat: security upgrade to 2.4.9
......@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libssh
pkgver=0.10.0
pkgrel=0
pkgrel=1
pkgdesc="Library for accessing ssh client services through C libraries"
options="!check" # Tests require CLIENT_TESTING enabled which needs socket_wrapper
url="https://www.libssh.org/"
......@@ -13,6 +13,7 @@ makedepends="$depends_dev cmake samurai"
checkdepends="cmocka-dev"
subpackages="$pkgname-dev"
source="https://www.libssh.org/files/${pkgver%.*}/libssh-$pkgver.tar.xz
strerror_r.patch
"
# secfixes:
......@@ -51,4 +52,5 @@ package() {
sha512sums="
d97235f78b94a980aabc844ee7614108944967441219f0c2417b207734d5200eb26efd5fd6de0da97a34fb612b843dc0a3b32a3364c1d8333e4c49680212aaaa libssh-0.10.0.tar.xz
e8af3698ddd55adcee6ddf58f5916cd8cc7b18792928d686ac8ed9463d645355c9e1b6c984d11d5399005372a35f347cccc45a320ce3464f5f39e4aee948d74b strerror_r.patch
"
uses the xsi-compliant strerror in the else block below instead
--- a/src/misc.c
+++ b/src/misc.c
@@ -1956,7 +1956,7 @@
#if defined(_WIN32)
strerror_s(buf, buflen, err_num);
return buf;
-#elif defined(__linux__) && defined(_GNU_SOURCE)
+#elif 0 && defined(__linux__) && defined(_GNU_SOURCE)
/* GNU extension on Linux */
return strerror_r(err_num, buf, buflen);
#else
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment