mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-29 05:21:44 -09:00
package/freeradius-server: bump version to 3.2.10
Removed patch 0004 due to upstream commit:
60d60eed11
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>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
5c9fbf7efe
commit
8af3e34fd4
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user