aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTheo Buehler <tb@openbsd.org>2023-12-19 20:18:29 +0100
committerBrent Cook <busterb@gmail.com>2024-03-03 15:32:50 -0600
commit453b5855aa805e123e3a1c492b8de4390d873c52 (patch)
treeff72d472462d8b63d4bc6a56721524a0ab2ca872 /include
parent84659877124116a474a51fa8d7284aaf7bd054b2 (diff)
downloadportable-453b5855aa805e123e3a1c492b8de4390d873c52.tar.gz
portable-453b5855aa805e123e3a1c492b8de4390d873c52.tar.bz2
portable-453b5855aa805e123e3a1c492b8de4390d873c52.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}