From 6e6eb242188e8312a6a8a78e6be0d11cd1036610 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 18 Mar 2026 21:17:10 +0000 Subject: MacOS doesn't have pthread_mutex_timedlock -_- --- src/sysdeps/trypthreadmutextimedlock.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/sysdeps/trypthreadmutextimedlock.c (limited to 'src/sysdeps/trypthreadmutextimedlock.c') diff --git a/src/sysdeps/trypthreadmutextimedlock.c b/src/sysdeps/trypthreadmutextimedlock.c new file mode 100644 index 0000000..f76f198 --- /dev/null +++ b/src/sysdeps/trypthreadmutextimedlock.c @@ -0,0 +1,11 @@ +/* ISC license. */ + +#include +#include + +int main (void) +{ + pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER ; + struct timespec ts = { .tv_sec = 0, .tv_nsec = 1 } ; + return pthread_mutex_timedlock(&mtx, &ts) ; +} -- cgit v1.3.1