X-Git-Url: https://pd.if.org/git/?p=pdclib.old;a=blobdiff_plain;f=opt%2Fpthreads%2Fmtx_timedlock.c;fp=opt%2Fpthreads%2Fmtx_timedlock.c;h=6cd1b866ac50982ff88f199bf7221804c9fff46c;hp=ed490a874cf836346d24ecb29badd5896201d5b8;hb=3862b03514c94f37966f61693619e6483ead6045;hpb=35d48051496adf237dcd22ff1324e93b6f351284 diff --git a/opt/pthreads/mtx_timedlock.c b/opt/pthreads/mtx_timedlock.c index ed490a8..6cd1b86 100644 --- a/opt/pthreads/mtx_timedlock.c +++ b/opt/pthreads/mtx_timedlock.c @@ -1,15 +1,17 @@ #ifndef REGTEST +#define _POSIX_C_SOURCE 2008098L #include // On Mac OS X, supress system definition of struct timespec #ifdef __APPLE__ #define _STRUCT_TIMESPEC struct timespec #endif #include +#include #include /* Can only implement if timeouts are supported. * - * Namely, Mac OS X does not implement timeouts + * Namely, Mac OS X does not implement timeouts */ #if defined(_POSIX_TIMEOUTS) && (_POSIX_TIMEOUTS - 200112L) >= 0L int mtx_timedlock(mtx_t *restrict mtx, const struct timespec *restrict ts)