]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Fix open-vm-tools build issues.
authorVMware, Inc <>
Thu, 17 Dec 2009 22:55:03 +0000 (14:55 -0800)
committerMarcelo Vanzin <mvanzin@vmware.com>
Thu, 17 Dec 2009 22:55:03 +0000 (14:55 -0800)
. 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 <mvanzin@vmware.com>
open-vm-tools/lib/lock/ul.c
open-vm-tools/lib/unicode/unicodeSimpleTypes.c
open-vm-tools/libvmtools/vmtoolsLog.c

index 22755c7eb68b6441da3cb93cac6b1467e8d63ddf..94e08a97c663f1beeb590ac70294e124f2ac31d5 100644 (file)
@@ -87,7 +87,7 @@ MXUserDumpAndPanic(MXRecLock *lock,   // IN:
    msg = Str_SafeVasprintf(NULL, fmt, ap);
    va_end(ap);
 
-   Panic(msg);
+   Panic("%s", msg);
 }
 
 
index 696671fa6c35851cca3745d9ba6a089a88bc2910..0faf30d6259cee9bf6ac8cb50327bf581546697c 100644 (file)
@@ -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;
index 8c2fb3430adff50da4766fff8c8d8251bfd1d14f..7d165f40de4acaba99c8e45a4297a450edf62ab5 100644 (file)
@@ -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. */
+               }
             }
          }
       }