Fixing NetBSD compatibility.

Instead of PTHREAD_STACK_MIN define, NetBSD requires to get minimum stack
size using sysctl(_SC_THREAD_STACK_MIN).

This change originally proposed by Juraj Lutter <juraj@lutter.sk>.
This commit is contained in:
Max Romanov
2021-03-02 18:30:34 +03:00
parent d0591f07d7
commit fddde539c9
2 changed files with 10 additions and 2 deletions

View File

@@ -142,6 +142,14 @@ nxt_thread_yield() \
#endif
#if (PTHREAD_STACK_MIN)
#define NXT_THREAD_STACK_MIN PTHREAD_STACK_MIN
#else
#define NXT_THREAD_STACK_MIN sysconf(_SC_THREAD_STACK_MIN)
#endif
struct nxt_thread_s {
nxt_log_t *log;
nxt_log_t main_log;