mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Fix: insufficient default stack for wolfSSL with glibc
This commit is contained in:
1 parent
a0ae86957f
commit
cb9effab9b
6 files changed
+41
-6
No files matched your search
+17
@@ -135,6 +135,23 @@ void daemonize(void);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* wolfSSL reserves around 48K of static thread-local storage. glibc counts
|
||||
that against the thread stack, so pthread_create() fails with EINVAL and
|
||||
no thread starts at all. musl places the block next to the stack instead
|
||||
of inside it and needs nothing extra, and OpenSSL has no static TLS.
|
||||
musl identifies itself by no macro of its own, but it does not define
|
||||
__GLIBC__, which any libc header pulled in above would have set.
|
||||
*/
|
||||
#ifndef TLSSTACKSIZE
|
||||
#if defined(__linux__) && !defined(__GLIBC__)
|
||||
#define TLSSTACKSIZE 0
|
||||
#elif defined(WITH_WOLFSSL)
|
||||
#define TLSSTACKSIZE 49152
|
||||
#else
|
||||
#define TLSSTACKSIZE 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
size_t threadstacksize(int extra);
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user