diff --git a/community/libssh/APKBUILD b/community/libssh/APKBUILD
index b5eeda9d04371e4512b531f40923a5f306c4ddb4..4beded2f26e4d78683b71981e11d4443fc5159f9 100644
--- a/community/libssh/APKBUILD
+++ b/community/libssh/APKBUILD
@@ -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
 "
diff --git a/community/libssh/strerror_r.patch b/community/libssh/strerror_r.patch
new file mode 100644
index 0000000000000000000000000000000000000000..362eae39212c2ecb34dbb48d78b14ce4a33056d5
--- /dev/null
+++ b/community/libssh/strerror_r.patch
@@ -0,0 +1,12 @@
+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