]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
openvmtools: Fix build against glibc >= 2.43
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 27 Jan 2026 11:10:57 +0000 (11:10 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 28 Jan 2026 11:29:23 +0000 (11:29 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/openvmtools

index 57acb1148062900ba9a98162eac28ad3bcc18571..6134cb4d41c0f33ef85700c9ad19b90f503bf3e2 100644 (file)
@@ -42,7 +42,7 @@ DEPS       =
 SERVICES   = openvmtools
 
 # Fix build with GCC 15
-CFLAGS    += -std=gnu17 -Wno-error=array-bounds
+CFLAGS    += -std=gnu17 -Wno-error=array-bounds -Wno-error=discarded-qualifiers
 
 ###############################################################################
 # Top-level Rules
@@ -84,6 +84,11 @@ $(subst %,%_BLAKE2,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && sed -i '/^void g_free(/i #undef g_free' lib/rpcChannel/glib_stubs.c
+       cd $(DIR_APP) && sed -i '/^void \*g_malloc(/i #undef g_malloc' lib/rpcChannel/glib_stubs.c
+       cd $(DIR_APP) && sed -i '/^void \*g_malloc0(/i #undef g_malloc0' lib/rpcChannel/glib_stubs.c
+       cd $(DIR_APP) && sed -i '/^void \*g_realloc(/i #undef g_realloc' lib/rpcChannel/glib_stubs.c
+       cd $(DIR_APP) && sed -i '/^char \*g_strdup(/i #undef g_strdup' lib/rpcChannel/glib_stubs.c
        cd $(DIR_APP) && autoreconf -vfi
        cd $(DIR_APP) && ./configure \
                                --prefix=/usr \