aboutsummaryrefslogtreecommitdiffstats
path: root/main/open-vm-tools/0010-use-posix-strerror_r-unless-gnu.patch
diff options
context:
space:
mode:
authorHenrik Riomar <henrik.riomar@gmail.com>2018-11-22 13:25:10 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2018-11-23 14:41:42 +0000
commit6413d57449d77bb2f9af64f3da33b28630b501d8 (patch)
treead92e65ec357063fa84baaf0de150304d65a8a80 /main/open-vm-tools/0010-use-posix-strerror_r-unless-gnu.patch
parent2c086abc7fcf9222a81b640aed6ae91f1be5afbc (diff)
downloadaports-6413d57449d77bb2f9af64f3da33b28630b501d8.tar.bz2
aports-6413d57449d77bb2f9af64f3da33b28630b501d8.tar.xz
main/open-vm-tools: upgrade 10.3.5
Rebased the patches and skiped the ones that was fixed by upstream Added check()
Diffstat (limited to 'main/open-vm-tools/0010-use-posix-strerror_r-unless-gnu.patch')
-rw-r--r--main/open-vm-tools/0010-use-posix-strerror_r-unless-gnu.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/main/open-vm-tools/0010-use-posix-strerror_r-unless-gnu.patch b/main/open-vm-tools/0010-use-posix-strerror_r-unless-gnu.patch
new file mode 100644
index 0000000000..62a666ee24
--- /dev/null
+++ b/main/open-vm-tools/0010-use-posix-strerror_r-unless-gnu.patch
@@ -0,0 +1,33 @@
+From 5dd2dbabd4c0535c44321c6c2303acff093c18c7 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Mon, 2 Jan 2017 14:39:27 +0000
+Subject: [PATCH 10/12] use posix strerror_r unless gnu
+
+---
+ open-vm-tools/lib/err/errPosix.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/open-vm-tools/lib/err/errPosix.c b/open-vm-tools/lib/err/errPosix.c
+index c81b4c13..a34e8190 100644
+--- a/open-vm-tools/lib/err/errPosix.c
++++ b/open-vm-tools/lib/err/errPosix.c
+@@ -63,11 +63,13 @@ ErrErrno2String(Err_Number errorNumber, // IN
+ {
+ char *p;
+
+-#if defined(__linux__) && !defined(__ANDROID__)
++#if defined(__GLIBC__)
+ p = strerror_r(errorNumber, buf, bufSize);
+ #else
+- p = strerror(errorNumber);
+-#endif
++ if (strerror_r(errorNumber, buf, bufSize) != 0)
++ snprintf(buf, bufSize, "unknown error %i", errorNumber);
++ p = buf;
++#endif /* defined __GLIBC__ */
+ ASSERT(p != NULL);
+ return p;
+ }
+--
+2.19.1
+