diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2017-01-02 15:32:02 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-01-02 15:32:49 +0000 |
commit | f6a385f8b07c6b6c16fc026dffa0b29d097b785d (patch) | |
tree | c75c172975f5a36407386c4e6575f5d15792e4a6 /main/open-vm-tools/0012-use-posix-strerror_r-unless-gnu.patch | |
parent | fdccff09e3ed4ded732b2d22d5d571642ad268bc (diff) | |
download | aports-f6a385f8b07c6b6c16fc026dffa0b29d097b785d.tar.bz2 aports-f6a385f8b07c6b6c16fc026dffa0b29d097b785d.tar.xz |
main/open-vm-tools: upgrade to 10.1.0 and enable -dbg
Diffstat (limited to 'main/open-vm-tools/0012-use-posix-strerror_r-unless-gnu.patch')
-rw-r--r-- | main/open-vm-tools/0012-use-posix-strerror_r-unless-gnu.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/main/open-vm-tools/0012-use-posix-strerror_r-unless-gnu.patch b/main/open-vm-tools/0012-use-posix-strerror_r-unless-gnu.patch new file mode 100644 index 0000000000..93d74cfb51 --- /dev/null +++ b/main/open-vm-tools/0012-use-posix-strerror_r-unless-gnu.patch @@ -0,0 +1,32 @@ +From 2d207751bdc8d5b8d391604c31730909e8e271a4 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Mon, 2 Jan 2017 14:39:27 +0000 +Subject: [PATCH 12/14] use posix strerror_r unless gnu + +--- + open-vm-tools/lib/err/errPosix.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/open-vm-tools/lib/err/errPosix.c b/open-vm-tools/lib/err/errPosix.c +index 37b45237..dd86fe90 100644 +--- a/open-vm-tools/lib/err/errPosix.c ++++ b/open-vm-tools/lib/err/errPosix.c +@@ -63,11 +63,12 @@ ErrErrno2String(Err_Number errorNumber, // IN + { + char *p; + +-#if defined(linux) && !defined(N_PLAT_NLM) && !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); ++#endif /* defined __GLIBC__ */ + ASSERT(p != NULL); + return p; + } +-- +2.11.0 + |