summaryrefslogtreecommitdiff
path: root/package/freeradius-server/patches/patch-src_include_threads_h
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2021-02-22 16:04:55 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2021-02-25 10:05:15 +0100
commite807fea5aecd87d079edfdbc603350cc3d9b57bb (patch)
treeb8123ca34cbff474c1d27178a600f8f40ae05975 /package/freeradius-server/patches/patch-src_include_threads_h
parent51a1e571546c842a5336696a7b3697a0899f0a72 (diff)
package/freeradius-server: Update to version 3.0.21
The old version 3.0.13 is no longer available for download. Adjust radiusd.conf, some items were moved to 'security' section. Install all dictionaries in /usr/share/freeradius - the base dictionary includes all but very few of them, so no point in explicitly stating which ones to include. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'package/freeradius-server/patches/patch-src_include_threads_h')
-rw-r--r--package/freeradius-server/patches/patch-src_include_threads_h36
1 files changed, 36 insertions, 0 deletions
diff --git a/package/freeradius-server/patches/patch-src_include_threads_h b/package/freeradius-server/patches/patch-src_include_threads_h
new file mode 100644
index 000000000..4626536e4
--- /dev/null
+++ b/package/freeradius-server/patches/patch-src_include_threads_h
@@ -0,0 +1,36 @@
+ fix for:
+ | src/lib/log.c:37:31: error: 'fr_strerror_buffer' undeclared (first use in this function)
+ found in https://github.com/Optware/Optware-ng/commit/6ece960830b3291bc4ad5780cdb49b0a377aab2e
+
+--- freeradius-server-3.0.21.orig/src/include/threads.h 2020-03-24 15:55:09.000000000 +0100
++++ freeradius-server-3.0.21/src/include/threads.h 2021-02-16 03:54:58.449715370 +0100
+@@ -89,7 +89,7 @@ static _t __fr_thread_local_init_##_n(pt
+ # 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_##
+ 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_set(_n, _v) ((int)!((_n = _v) || 1))
++# define fr_thread_local_get(_n) _n
+ #endif
+ #endif