From: Lovin Yarn Date: Wed, 30 Jul 2025 11:56:13 +0000 (+0800) Subject: libsodium: fix building with GCC 15.1 X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=7814960a7d87b9b69728c1dae8db754314ceb8de;p=feed%2Fpackages.git libsodium: fix building with GCC 15.1 Force the default C version to -std=gnu17, to fix the following build error: : error: unknown type name 'thread_local'; did you mean 'pthread_rwlock_t'? randombytes/internal/randombytes_internal_random.c:132:8: note: in expansion of macro 'TLS' 132 | static TLS InternalRandom stream = { | ^~~ randombytes/internal/randombytes_internal_random.c:132:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'stream' 132 | static TLS InternalRandom stream = { | ^~~~~~ [1] https://github.com/openwrt/openwrt/pull/16522#issuecomment-3134756935 [2] https://github.com/openwrt/packages/issues/27122 Tested-by: Georgi Valkov Signed-off-by: Lovin Yarn --- diff --git a/libs/libsodium/Makefile b/libs/libsodium/Makefile index 9c207f89b4..568c59ab84 100644 --- a/libs/libsodium/Makefile +++ b/libs/libsodium/Makefile @@ -55,6 +55,8 @@ menu "Configuration" endmenu endef +TARGET_CFLAGS += -std=gnu17 + CONFIGURE_ARGS+= \ --disable-ssp \ $(if $(CONFIG_LIBSODIUM_MINIMAL),--enable,--disable)-minimal