# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/open-vm-tools/hotfix-gfree.patch # Copyright (C) 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- Parenthesize the g_free stub, glib >= 2.78 may define g_free as a function-like macro calling g_free_sized, stubbed as well. diff -Nrup open-vm-tools-stable-13.1.0.orig/open-vm-tools/lib/rpcChannel/glib_stubs.c open-vm-tools-stable-13.1.0/open-vm-tools/lib/rpcChannel/glib_stubs.c --- open-vm-tools-stable-13.1.0.orig/open-vm-tools/lib/rpcChannel/glib_stubs.c 2026-05-14 06:59:48.000000000 +0200 +++ open-vm-tools-stable-13.1.0/open-vm-tools/lib/rpcChannel/glib_stubs.c 2026-09-27 18:36:52.892288499 +0200 @@ -35,7 +35,8 @@ void *g_malloc0(size_t s) { return Util_SafeCalloc(1, s); } void *g_malloc0_n(size_t n, size_t s) { return Util_SafeCalloc(n, s); } -void g_free(void *p) { free(p); } +void (g_free)(void *p) { free(p); } +void g_free_sized(void *p, size_t s) { free(p); } void g_mutex_init(GMutex *mutex) { } void g_mutex_clear(GMutex *mutex) { }