From: VMware, Inc <> Date: Thu, 17 Dec 2009 22:55:03 +0000 (-0800) Subject: Fix open-vm-tools build issues. X-Git-Tag: 2009.12.16-217847~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff7ec337fa589146bfbbb2ac72ace21e2502ad99;p=thirdparty%2Fopen-vm-tools.git Fix open-vm-tools build issues. . codeset.c is not compiled when using --without-icu, so we shouldn't reference symbols implemented in that file in that case. . gcc 4.3.2 complains about calling Panic() with a non-const format string. . Ubuntu 9.10 complains about ignoring the return value of chdir. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/lock/ul.c b/open-vm-tools/lib/lock/ul.c index 22755c7eb..94e08a97c 100644 --- a/open-vm-tools/lib/lock/ul.c +++ b/open-vm-tools/lib/lock/ul.c @@ -87,7 +87,7 @@ MXUserDumpAndPanic(MXRecLock *lock, // IN: msg = Str_SafeVasprintf(NULL, fmt, ap); va_end(ap); - Panic(msg); + Panic("%s", msg); } diff --git a/open-vm-tools/lib/unicode/unicodeSimpleTypes.c b/open-vm-tools/lib/unicode/unicodeSimpleTypes.c index 696671fa6..0faf30d62 100644 --- a/open-vm-tools/lib/unicode/unicodeSimpleTypes.c +++ b/open-vm-tools/lib/unicode/unicodeSimpleTypes.c @@ -2403,7 +2403,7 @@ Unicode_EncodingNameToEnum(const char *encodingName) // IN if (xRef[idx].isSupported) { return xRef[idx].encoding; } -#if defined(VMX86_TOOLS) +#if defined(VMX86_TOOLS) && (!defined(OPEN_VM_TOOLS) || defined(USE_ICU)) if (idx == UnicodeIANALookup(CodeSet_GetCurrentCodeSet())) { CodeSet_DontUseIcu(); return xRef[idx].encoding; diff --git a/open-vm-tools/libvmtools/vmtoolsLog.c b/open-vm-tools/libvmtools/vmtoolsLog.c index 8c2fb3430..7d165f40d 100644 --- a/open-vm-tools/libvmtools/vmtoolsLog.c +++ b/open-vm-tools/libvmtools/vmtoolsLog.c @@ -311,7 +311,9 @@ VMToolsLogPanic(void) */ const char *home = getenv("HOME"); if (home != NULL) { - chdir(home); + if (chdir(home)) { + /* Just to make glibc headers happy. */ + } } } }