]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Change to common header file not applicable to open-vm-tools.
authorKaty Feng <fkaty@vmware.com>
Thu, 5 Oct 2023 17:35:28 +0000 (10:35 -0700)
committerKaty Feng <fkaty@vmware.com>
Thu, 5 Oct 2023 17:35:28 +0000 (10:35 -0700)
open-vm-tools/lib/include/dynarray.h

index 3b848290b6ad8a8250e3de4a58e4259552edf180..f55d77091f8a22cc22aa836699f8b3dc298a83e9 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2004-2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 2004-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
@@ -254,8 +254,14 @@ DynArray_Copy(DynArray *src,        // IN
  *
  * Yes, it's a poor man's template (but better than nothing).
  *
+ * Note that emscripten does not allow function pointer casting, and has a
+ * compiler warning to enforce this, so we cannot use DEFINE_DYNARRAY_TYPE
+ * as it relies on a function cast to define T##Array_QSort.
+ *
  */
 
+#ifndef __EMSCRIPTEN__
+
 #define DEFINE_DYNARRAY_TYPE(T)     DEFINE_DYNARRAY_NAMED_TYPE(T, T)
 
 #define DEFINE_DYNARRAY_NAMED_TYPE(T, TYPE)                             \
@@ -354,9 +360,12 @@ DynArray_Copy(DynArray *src,        // IN
    {                                                                    \
       return DynArray_Copy((DynArray *)src, (DynArray *)dest);          \
    }
+
 /* Define DynArray of DynBuf. */
 DEFINE_DYNARRAY_TYPE(DynBuf)
 
+#endif // ifndef __EMSCRIPTEN__
+
 #if defined(__cplusplus)
 }  // extern "C"
 #endif