summaryrefslogtreecommitdiff
path: root/radsecproxy.h
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2016-10-17 07:47:42 +0200
committerLinus Nordberg <linus@nordu.net>2016-10-17 09:04:30 +0200
commite901dd8cf7f762ed12b440d5ee46e953efa50bbb (patch)
tree8bb4af422e35c0c25278d2f3b1d01aa2ec909a5b /radsecproxy.h
parent95ef105558bf80274d7624bdf584ae2b4f84c388 (diff)
Don't use a smaller pthread stack size than what's allowed.
Patch by Kolbjørn Barmen.
Diffstat (limited to 'radsecproxy.h')
-rw-r--r--radsecproxy.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/radsecproxy.h b/radsecproxy.h
index 0b2aebe..982515c 100644
--- a/radsecproxy.h
+++ b/radsecproxy.h
@@ -23,7 +23,16 @@
#define MAX_CERT_DEPTH 5
#define STATUS_SERVER_PERIOD 25
#define IDLE_TIMEOUT 300
+
+/* We want PTHREAD_STACK_SIZE to be 32768, but some platforms
+ * have a higher minimum value defined in PTHREAD_STACK_MIN. */
#define PTHREAD_STACK_SIZE 32768
+#if defined(PTHREAD_STACK_MIN)
+#if PTHREAD_STACK_MIN > PTHREAD_STACK_SIZE
+#undef PTHREAD_STACK_SIZE
+#define PTHREAD_STACK_SIZE PTHREAD_STACK_MIN
+#endif
+#endif
/* 27262 is vendor DANTE Ltd. */
#define DEFAULT_TTL_ATTR "27262:1"