From a3ce1e4ed5d76239fb5ba6ce86908d62795f7e61 Mon Sep 17 00:00:00 2001 From: MastaG Date: Sun, 30 Mar 2025 20:49:27 +0200 Subject: [PATCH] Build pvrtex using GNU(++) 17 standard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Recent distros feature GCC 15 which defaults to C23. ATOMIC_VAR_INIT has been removed from the C23 standard. This causes the following build failure: mem.c:72:39: fout: implicit declaration of function ‘ATOMIC_VAR_INIT’; did you mean ‘ATOMIC_FLAG_INIT’? [-Wimplicit-function-declaration] 72 | static atomic_size_t max_alloc_size = ATOMIC_VAR_INIT(INT_MAX); | ^~~~~~~~~~~~~~~ | ATOMIC_FLAG_INIT Workaround this by telling the compiler to build using GNU 17 instead. --- vendor/pvrtex/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/pvrtex/Makefile b/vendor/pvrtex/Makefile index 9fee5492..dc82b1c9 100644 --- a/vendor/pvrtex/Makefile +++ b/vendor/pvrtex/Makefile @@ -14,8 +14,8 @@ else endif MYFLAGS=-Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Ilibavutil -I. -DCONFIG_MEMORY_POISONING=0 -DHAVE_FAST_UNALIGNED=0 -MYCPPFLAGS=$(MYFLAGS) -MYCFLAGS=$(MYFLAGS) -Wno-pointer-sign +MYCPPFLAGS=$(MYFLAGS) -std=gnu++17 +MYCFLAGS=$(MYFLAGS) -Wno-pointer-sign -std=gnu17 .PHONY: all clean