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

[xen staging] libs/store: make build without PTHREAD_STACK_MIN



commit e402441d4c02908cea9c14392fd7c2831c0456d0
Author:     Manuel Bouyer <bouyer@xxxxxxxxxx>
AuthorDate: Tue Jan 26 23:47:59 2021 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Fri Jan 29 22:50:08 2021 +0000

    libs/store: make build without PTHREAD_STACK_MIN
    
    On NetBSD, PTHREAD_STACK_MIN is not available.
    If PTHREAD_STACK_MIN is not defined, define it to 0 so that we fallback to
    DEFAULT_THREAD_STACKSIZE
    
    Signed-off-by: Manuel Bouyer <bouyer@xxxxxxxxxx>
    Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 tools/libs/store/xs.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c
index 4ac73ec317..b6ecbd787e 100644
--- a/tools/libs/store/xs.c
+++ b/tools/libs/store/xs.c
@@ -811,6 +811,11 @@ bool xs_watch(struct xs_handle *h, const char *path, const 
char *token)
 
 #ifdef USE_PTHREAD
 #define DEFAULT_THREAD_STACKSIZE (16 * 1024)
+/* NetBSD doesn't have PTHREAD_STACK_MIN. */
+#ifndef PTHREAD_STACK_MIN
+# define PTHREAD_STACK_MIN 0
+#endif
+
 #define READ_THREAD_STACKSIZE                                  \
        ((DEFAULT_THREAD_STACKSIZE < PTHREAD_STACK_MIN) ?       \
        PTHREAD_STACK_MIN : DEFAULT_THREAD_STACKSIZE)
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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