* [Buildroot] [PATCH 1/1] package/freeradius-server: bump version to 3.2.10
@ 2026-09-11 20:57 Bernd Kuhls
2026-09-12 7:39 ` Peter Korsgaard
0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2026-09-11 20:57 UTC (permalink / raw)
To: buildroot; +Cc: David GOUARIN
Removed patch 0004 due to upstream commit:
https://github.com/FreeRADIUS/freeradius-server/commit/60d60eed118b3655aea1922b1442bcbe8c9b6270
which removes the patched code part.
Added new patch 0004 to fix build errors resulting from the commit
mentioned above.
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
Gitlab pipelines passed:
https://gitlab.com/bkuhls/buildroot/-/commits/77319bc4611291d9498e1d2b12a1e79aaac988d0
...r-for-expansion-of-macro-in-thread.h.patch | 66 ------------------
.../0004-fix-threads-h-pthread-fallback.patch | 69 +++++++++++++++++++
.../freeradius-server/freeradius-server.hash | 4 +-
.../freeradius-server/freeradius-server.mk | 2 +-
4 files changed, 72 insertions(+), 69 deletions(-)
delete mode 100644 package/freeradius-server/0004-fix-error-for-expansion-of-macro-in-thread.h.patch
create mode 100644 package/freeradius-server/0004-fix-threads-h-pthread-fallback.patch
diff --git a/package/freeradius-server/0004-fix-error-for-expansion-of-macro-in-thread.h.patch b/package/freeradius-server/0004-fix-error-for-expansion-of-macro-in-thread.h.patch
deleted file mode 100644
index 00eb63c0f2..0000000000
--- a/package/freeradius-server/0004-fix-error-for-expansion-of-macro-in-thread.h.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From dae3b7c53171dfeacce91e0da1c8bd4e4166352e Mon Sep 17 00:00:00 2001
-From: Yi Zhao <yi.zhao@windriver.com>
-Date: Wed, 18 Jan 2017 14:59:39 +0800
-Subject: [PATCH] fix error for expansion of macro in thread.h
-
-The parameter declaration is missing in expansion of macro
-which cause the build error:
-| In file included from src/freeradius-devel/libradius.h:80:0,
-| from src/lib/log.c:26:
-| src/lib/log.c: In function '__fr_thread_local_destroy_fr_strerror_buffer':
-| src/lib/log.c:37:31: error: 'fr_strerror_buffer' undeclared (first use in this function)
-| fr_thread_local_setup(char *, fr_strerror_buffer) /* macro */
-| ^
-
-Add the missing declaration in macro.
-
-Upstream-Status: Pending
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
-
-Fetch from: http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-connectivity/freeradius/files
-Signed-off-by: David Gouarin <david.gouarin@thalesgroup.com>
-Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
-Upstream: N/A, code has changed
----
- src/include/threads.h | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/src/include/threads.h b/src/include/threads.h
-index e36d81dac0..2bcb6aadcb 100644
---- a/src/include/threads.h
-+++ b/src/include/threads.h
-@@ -89,7 +89,7 @@ static _t __fr_thread_local_init_##_n(pthread_destructor_t func)\
- # define fr_thread_local_get(_n) _n
- #elif defined(HAVE_PTHREAD_H)
- # include <pthread.h>
--# define fr_thread_local_setup(_t, _n) \
-+# define fr_thread_local_setup(_t, _n) static __thread _t _n;\
- static pthread_key_t __fr_thread_local_key_##_n;\
- static pthread_once_t __fr_thread_local_once_##_n = PTHREAD_ONCE_INIT;\
- static pthread_destructor_t __fr_thread_local_destructor_##_n = NULL;\
-@@ -100,17 +100,17 @@ static void __fr_thread_local_destroy_##_n(UNUSED void *unused)\
- static void __fr_thread_local_key_init_##_n(void)\
- {\
- (void) pthread_key_create(&__fr_thread_local_key_##_n, __fr_thread_local_destroy_##_n);\
-- (void) pthread_setspecific(__fr_thread_local_key_##_n, &(_n));\
- }\
- static _t __fr_thread_local_init_##_n(pthread_destructor_t func)\
- {\
- __fr_thread_local_destructor_##_n = func;\
- if (_n) return _n; \
- (void) pthread_once(&__fr_thread_local_once_##_n, __fr_thread_local_key_init_##_n);\
-+ (void) pthread_setspecific(__fr_thread_local_key_##_n, &(_n));\
- return _n;\
- }
--# define fr_thread_local_init(_n, _f) __fr_thread_local_init_##_n(_f)
--# define fr_thread_local_set(_n, _v) __fr_thread_local_set_##_n(_v)
--# define fr_thread_local_get(_n) __fr_thread_local_get_##_n()
-+# define fr_thread_local_init(_n, _f) __fr_thread_local_init_##_n(_f)
-+# define fr_thread_local_set(_n, _v) ((int)!((_n = _v) || 1))
-+# define fr_thread_local_get(_n) _n
- #endif
- #endif
---
-2.17.1
-
diff --git a/package/freeradius-server/0004-fix-threads-h-pthread-fallback.patch b/package/freeradius-server/0004-fix-threads-h-pthread-fallback.patch
new file mode 100644
index 0000000000..f80dcbe997
--- /dev/null
+++ b/package/freeradius-server/0004-fix-threads-h-pthread-fallback.patch
@@ -0,0 +1,69 @@
+From: Josip Stjepanović <jstjep00@gmail.com>
+Subject: [PATCH] fix build failure in HAVE_PTHREAD_H fallback of threads.h
+
+Upstream 3.2.10 only implemented the `defined(__THREAD)` branch of the
+thread-local-storage macros (used when the compiler supports the
+`__thread` storage class, detected via TLS_STORAGE_CLASS). The
+remaining `defined(HAVE_PTHREAD_H)` fallback branch, taken when no
+compiler TLS support is detected but pthreads are available (as
+happens on some aarch64/musl toolchains), was left as `#error
+unsupported`, breaking the build.
+
+This mirrors the previously dropped
+003-freeradius-fix-error-for-expansion-of-macro.patch implementation
+for the `__THREAD` branch into the `HAVE_PTHREAD_H` branch, and adds
+the `if (_n) return _n;` early-return guard to both so
+`fr_thread_local_init()` does not re-run `pthread_once`/
+`pthread_setspecific` on every call.
+
+Reported-by: BKPepe <https://github.com/openwrt/packages/pull/29842#issuecomment-4859328263>
+Patch-by: vortexilation <https://github.com/openwrt/packages/pull/29842#issuecomment-4859798519>
+
+Upstream: https://github.com/FreeRADIUS/freeradius-server/issues/5890
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+
+--- a/src/include/threads.h
++++ b/src/include/threads.h
+@@ -82,7 +82,8 @@ static void __fr_thread_local_key_init_##_n(void)\
+ static _t __fr_thread_local_init_##_n(pthread_destructor_t func)\
+ {\
+ __fr_thread_local_destructor_##_n = func;\
+- (void) pthread_once(&__fr_thread_local_once_##_n, __fr_thread_local_key_init_##_n); \
++ if (_n) return _n; \
++ (void) pthread_once(&__fr_thread_local_once_##_n, __fr_thread_local_key_init_##_n);\
+ (void) pthread_setspecific(__fr_thread_local_key_##_n, &(_n));\
+ return _n;\
+ }
+@@ -90,6 +91,29 @@ static _t __fr_thread_local_init_##_n(pthread_destructor_t func)\
+ # define fr_thread_local_set(_n, _v) ((int)!((_n = _v) || 1))
+ # define fr_thread_local_get(_n) _n
+ #elif defined(HAVE_PTHREAD_H)
+-#error unsupported
++# include <pthread.h>
++# define fr_thread_local_setup(_t, _n) static __thread _t _n;\
++static pthread_key_t __fr_thread_local_key_##_n;\
++static pthread_once_t __fr_thread_local_once_##_n = PTHREAD_ONCE_INIT;\
++static pthread_destructor_t __fr_thread_local_destructor_##_n = NULL;\
++static void __fr_thread_local_destroy_##_n(UNUSED void *unused)\
++{\
++ __fr_thread_local_destructor_##_n(_n);\
++}\
++static void __fr_thread_local_key_init_##_n(void)\
++{\
++ (void) pthread_key_create(&__fr_thread_local_key_##_n, __fr_thread_local_destroy_##_n);\
++}\
++static _t __fr_thread_local_init_##_n(pthread_destructor_t func)\
++{\
++ __fr_thread_local_destructor_##_n = func;\
++ if (_n) return _n; \
++ (void) pthread_once(&__fr_thread_local_once_##_n, __fr_thread_local_key_init_##_n);\
++ (void) pthread_setspecific(__fr_thread_local_key_##_n, &(_n));\
++ return _n;\
++}
++# define fr_thread_local_init(_n, _f) __fr_thread_local_init_##_n(_f)
++# define fr_thread_local_set(_n, _v) ((int)!((_n = _v) || 1))
++# define fr_thread_local_get(_n) _n
+ #endif
+ #endif
diff --git a/package/freeradius-server/freeradius-server.hash b/package/freeradius-server/freeradius-server.hash
index b90aa4b657..73c0180a2f 100644
--- a/package/freeradius-server/freeradius-server.hash
+++ b/package/freeradius-server/freeradius-server.hash
@@ -1,4 +1,4 @@
# Locally computed, after checking
-# https://freeradius.org/ftp/pub/freeradius/freeradius-server-3.2.8.tar.bz2.sig
-sha256 2c6483baeba65f939734473fafa31c4f727e8e139dd884563121412b6aba681b freeradius-server-3.2.8.tar.bz2
+# https://freeradius.org/ftp/pub/freeradius/freeradius-server-3.2.10.tar.bz2.sig
+sha256 e30ce4b071ad4b48e7eb0c34c66324a32c2548cfc067900941a90f017dc174e3 freeradius-server-3.2.10.tar.bz2
sha256 0a0e46014fc2efd5144a30359c0e6e1ea9fa3dd407d3318204150efd7b4caf6a COPYRIGHT
diff --git a/package/freeradius-server/freeradius-server.mk b/package/freeradius-server/freeradius-server.mk
index 80ace1c130..2ac6480934 100644
--- a/package/freeradius-server/freeradius-server.mk
+++ b/package/freeradius-server/freeradius-server.mk
@@ -4,7 +4,7 @@
#
################################################################################
-FREERADIUS_SERVER_VERSION = 3.2.8
+FREERADIUS_SERVER_VERSION = 3.2.10
FREERADIUS_SERVER_SOURCE = \
freeradius-server-$(FREERADIUS_SERVER_VERSION).tar.bz2
FREERADIUS_SERVER_SITE = https://freeradius.org/ftp/pub/freeradius
--
2.47.3
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/freeradius-server: bump version to 3.2.10
2026-09-11 20:57 [Buildroot] [PATCH 1/1] package/freeradius-server: bump version to 3.2.10 Bernd Kuhls
@ 2026-09-12 7:39 ` Peter Korsgaard
0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2026-09-12 7:39 UTC (permalink / raw)
To: Bernd Kuhls; +Cc: buildroot, David GOUARIN
>>>>> "Bernd" == Bernd Kuhls <bernd@kuhls.net> writes:
> Removed patch 0004 due to upstream commit:
> https://github.com/FreeRADIUS/freeradius-server/commit/60d60eed118b3655aea1922b1442bcbe8c9b6270
> which removes the patched code part.
> Added new patch 0004 to fix build errors resulting from the commit
> mentioned above.
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Committed, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-12 7:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11 20:57 [Buildroot] [PATCH 1/1] package/freeradius-server: bump version to 3.2.10 Bernd Kuhls
2026-09-12 7:39 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.