diff -Nur 1/nsswitch/wb_common.c 2/nsswitch/wb_common.c --- 1/nsswitch/wb_common.c 2023-09-02 13:38:34.506064173 -0700 +++ 2/nsswitch/wb_common.c 2023-09-05 14:29:33.401277456 -0700 @@ -32,6 +32,9 @@ #include #endif +/* workaround for https://bugzilla.samba.org/show_bug.cgi?id=15464 */ +#undef HAVE_PTHREAD + static __thread char client_name[32]; /* Global context */ @@ -104,7 +107,6 @@ wb_thread_ctx_destructor); assert(ret == 0); } -#endif static struct winbindd_context *get_wb_thread_ctx(void) { @@ -139,6 +141,7 @@ } return ctx; } +#endif static struct winbindd_context *get_wb_global_ctx(void) { @@ -246,7 +249,7 @@ return; } -#ifdef HAVE_PTHREAD_H +#ifdef HAVE_PTHREAD ctx = (struct winbindd_context *)pthread_getspecific(wb_global_ctx.key); if (ctx == NULL) { return;