void-packages/srcpkgs/open-vm-tools/patches/0010-use-posix-strerror_r-unless-gnu.patch
Piraty 2375b47faa open-vm-tools: update to 11.0.5.
* build for musl as well
    * most patches are borrowed from alpine
    * resolver compat borrowed from `srcpkgs/qt5/files/resolv_compat.h`
* build from sources instead of build tarball
* drop dependencies `libdnet` and `icu`, as upstream disables them by
default now for linux builds (9f52cd, fcb7bb7)

Closes #18611
2020-01-30 18:30:14 +01:00

36 lines
1.1 KiB
Diff

#src: https://git.alpinelinux.org/aports/tree/community/open-vm-tools?id=6e0f65e51bfcd02c53bc2b78f46ed18af2dd7ea0
#upstream: no
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
--- open-vm-tools/lib/err/errPosix.c
+++ 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