]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Change to common source file not applicable to open-vm-tools.
authorKaty Feng <fkaty@vmware.com>
Tue, 22 Aug 2023 18:11:42 +0000 (11:11 -0700)
committerKaty Feng <fkaty@vmware.com>
Tue, 22 Aug 2023 18:11:42 +0000 (11:11 -0700)
open-vm-tools/lib/misc/codesetOld.c

index 4086959aa7c048641d4751ca18027c351894f475..fb4f194bbddd81397ebc0f2c2e4847a2bb30d23b 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2017,2019,2021,2022 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2017,2019,2021-2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -646,7 +646,7 @@ CodeSetOldGetCodeSetFromLocale(void)
 {
    char *codeset;
 
-#if defined(__linux__)
+#if defined(__linux__) || defined(__EMSCRIPTEN__)
 
    locale_t new = newlocale(LC_CTYPE_MASK, "", NULL);
    if (!new) {
@@ -656,9 +656,9 @@ CodeSetOldGetCodeSetFromLocale(void)
        * locale.
        */
 
-      new = newlocale(LC_CTYPE_MASK, "C", NULL); 
-      ASSERT(new); 
-   } 
+      new = newlocale(LC_CTYPE_MASK, "C", NULL);
+      ASSERT(new);
+   }
    codeset = Util_SafeStrdup(nl_langinfo_l(CODESET, new));
    freelocale(new);
 
@@ -928,7 +928,7 @@ CodeSetOld_GenericToGenericDb(char const *codeIn,   // IN:
        * change bufIn so a simple cast is safe. --plangdale
        */
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__EMSCRIPTEN__)
       status = iconv(cd, (char **)&bufIn, &sizeIn, &out, &outLeft);
 #else
       status = iconv(cd, &bufIn, &sizeIn, &out, &outLeft);