[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] libs/store: make build without PTHREAD_STACK_MIN



From: Manuel Bouyer <bouyer@xxxxxxxxxx>

On NetBSD, PTHREAD_STACK_MIN is not available.
Just use DEFAULT_THREAD_STACKSIZE if PTHREAD_STACK_MIN is not available.

Signed-off-by: Manuel Bouyer <bouyer@xxxxxxxxxx>
---
 tools/libs/store/xs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c
index 4ac73ec317..8e646b98d6 100644
--- a/tools/libs/store/xs.c
+++ b/tools/libs/store/xs.c
@@ -811,9 +811,13 @@ bool xs_watch(struct xs_handle *h, const char *path, const 
char *token)
 
 #ifdef USE_PTHREAD
 #define DEFAULT_THREAD_STACKSIZE (16 * 1024)
+#ifndef PTHREAD_STACK_MIN
+#define READ_THREAD_STACKSIZE DEFAULT_THREAD_STACKSIZE
+#else
 #define READ_THREAD_STACKSIZE                                  \
        ((DEFAULT_THREAD_STACKSIZE < PTHREAD_STACK_MIN) ?       \
        PTHREAD_STACK_MIN : DEFAULT_THREAD_STACKSIZE)
+#endif
 
        /* We dynamically create a reader thread on demand. */
        mutex_lock(&h->request_mutex);
-- 
2.29.2




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.