aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTheo Buehler <tb@openbsd.org>2023-12-19 20:18:29 +0100
committerTheo Buehler <tb@openbsd.org>2023-12-19 20:18:29 +0100
commitc515f24515e226c1f9b402adacac146868a273f0 (patch)
tree85d30bd1a55032cfe01a6d626625671ffe04463b /include
parent1862efa835a8f290bd423989c8802c2445d428d0 (diff)
downloadportable-c515f24515e226c1f9b402adacac146868a273f0.tar.gz
portable-c515f24515e226c1f9b402adacac146868a273f0.tar.bz2
portable-c515f24515e226c1f9b402adacac146868a273f0.zip
pthread_once() returns an error code on failure
Diffstat (limited to 'include')
-rw-r--r--include/compat/pthread.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/compat/pthread.h b/include/compat/pthread.h
index ed1b9dc..8211dda 100644
--- a/include/compat/pthread.h
+++ b/include/compat/pthread.h
@@ -48,7 +48,7 @@ pthread_once(pthread_once_t *once, void (*cb) (void))
48 struct _pthread_win32_cb_arg arg = { .cb = cb }; 48 struct _pthread_win32_cb_arg arg = { .cb = cb };
49 BOOL rc = InitOnceExecuteOnce(&once->once, _pthread_once_win32_cb, &arg, NULL); 49 BOOL rc = InitOnceExecuteOnce(&once->once, _pthread_once_win32_cb, &arg, NULL);
50 if (rc == 0) 50 if (rc == 0)
51 return -1; 51 return EINVAL;
52 else 52 else
53 return 0; 53 return 0;
54} 54}