new file mode 100644
@@ -0,0 +1,31 @@
+From c21c9a7c1ef89c63c1b124a0f49d95ed6ae8f19d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 21 Nov 2025 00:29:10 -0800
+Subject: [PATCH] glib_stubs: avoid GLib g_free macro redefinition error
+
+glib 2.78+ defines g_free as an object-size checking macro.
+open-vm-tools overrides g_free(), leading to preprocessor expansion
+inside the function signature and breaking the build.
+
+Undefine the macro before defining the stub.
+
+Upstream-Status: Submitted [https://github.com/vmware/open-vm-tools/pull/779]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ open-vm-tools/lib/rpcChannel/glib_stubs.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/open-vm-tools/lib/rpcChannel/glib_stubs.c b/open-vm-tools/lib/rpcChannel/glib_stubs.c
+index c32deb073..cb89c6a87 100644
+--- a/open-vm-tools/lib/rpcChannel/glib_stubs.c
++++ b/open-vm-tools/lib/rpcChannel/glib_stubs.c
+@@ -35,6 +35,9 @@
+
+ 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); }
++/* GLib defines g_free as a macro, so undefine it before providing
++ * our own stub implementation. */
++#undef g_free
+ void g_free(void *p) { free(p); }
+
+ void g_mutex_init(GMutex *mutex) { }
@@ -43,6 +43,7 @@ SRC_URI = "git://github.com/vmware/open-vm-tools.git;protocol=https;branch=stabl
file://0012-hgfsServerLinux-Consider-64bit-time_t-possibility.patch;patchdir=.. \
file://0013-open-vm-tools-Correct-include-path-for-poll.h.patch;patchdir=.. \
file://0014-timeSync-Portable-way-to-print-64bit-time_t.patch;patchdir=.. \
+ file://0001-glib_stubs-avoid-GLib-g_free-macro-redefinition-erro.patch;patchdir=.. \
"
UPSTREAM_CHECK_GITTAGREGEX = "stable-(?P<pver>\d+(\.\d+)+)"
Signed-off-by: Khem Raj <raj.khem@gmail.com> --- ...-GLib-g_free-macro-redefinition-erro.patch | 31 +++++++++++++++++++ .../open-vm-tools/open-vm-tools_13.0.5.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644 meta-networking/recipes-support/open-vm-tools/open-vm-tools/0001-glib_stubs-avoid-GLib-g_free-macro-redefinition-erro.patch