diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-07-17 20:10:11 -0700 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-07-24 18:58:51 +0200 |
commit | 94670cce6b0aa7c9aa59715b967d2bc28bc122a5 (patch) | |
tree | 1c6e9e778d8f9a2f76ea940d2e4b21a0510a27ed /meta-oe/recipes-support/open-vm-tools/open-vm-tools/0008-use-posix-strerror_r-unless-gnu.patch | |
parent | 4022026b7ed9eb2e521c3c47b06f12cfb721dabf (diff) | |
download | meta-openembedded-contrib-94670cce6b0aa7c9aa59715b967d2bc28bc122a5.tar.gz |
open-vm-tools: Fix build with musl
Use SPDX format for LICENSES
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/open-vm-tools/open-vm-tools/0008-use-posix-strerror_r-unless-gnu.patch')
-rw-r--r-- | meta-oe/recipes-support/open-vm-tools/open-vm-tools/0008-use-posix-strerror_r-unless-gnu.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0008-use-posix-strerror_r-unless-gnu.patch b/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0008-use-posix-strerror_r-unless-gnu.patch new file mode 100644 index 0000000000..3d1291c9fa --- /dev/null +++ b/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0008-use-posix-strerror_r-unless-gnu.patch @@ -0,0 +1,30 @@ +From d4d1e7146ca2698089f6bd532f2fb8b9c1134ca7 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Mon, 2 Jan 2017 14:39:27 +0000 +Subject: [PATCH 08/11] use posix strerror_r unless gnu + +--- + open-vm-tools/lib/err/errPosix.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +Index: open-vm-tools/lib/err/errPosix.c +=================================================================== +--- open-vm-tools.orig/lib/err/errPosix.c ++++ open-vm-tools/lib/err/errPosix.c +@@ -63,11 +63,13 @@ ErrErrno2String(Err_Number errorNumber, + { + 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); ++ p = buf; ++#endif /* defined __GLIBC__ */ + ASSERT(p != NULL); + return p; + } |