From c515f24515e226c1f9b402adacac146868a273f0 Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Tue, 19 Dec 2023 20:18:29 +0100 Subject: [PATCH] pthread_once() returns an error code on failure --- include/compat/pthread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/compat/pthread.h b/include/compat/pthread.h index ed1b9dc51a..8211dda327 100644 --- a/include/compat/pthread.h +++ b/include/compat/pthread.h @@ -48,7 +48,7 @@ pthread_once(pthread_once_t *once, void (*cb) (void)) struct _pthread_win32_cb_arg arg = { .cb = cb }; BOOL rc = InitOnceExecuteOnce(&once->once, _pthread_once_win32_cb, &arg, NULL); if (rc == 0) - return -1; + return EINVAL; else return 0; }