this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add definition of CLOCK_REALTIME to time.h It was added with macOS 10.12 Needed by ruby The implementation will be there when libc is updated to the 10.12 sources

+38
+38
src/libc/include/time.h
··· 204 204 #else /* LIBC_ALIAS_NANOSLEEP */ 205 205 int nanosleep(const struct timespec *, struct timespec *) LIBC_ALIAS_C(nanosleep); 206 206 #endif /* !LIBC_ALIAS_NANOSLEEP */ 207 + 208 + 209 + #if !defined(_DARWIN_FEATURE_CLOCK_GETTIME) || _DARWIN_FEATURE_CLOCK_GETTIME != 0 210 + 211 + typedef enum { 212 + _CLOCK_REALTIME = 0, 213 + #define CLOCK_REALTIME _CLOCK_REALTIME 214 + _CLOCK_MONOTONIC = 6, 215 + #define CLOCK_MONOTONIC _CLOCK_MONOTONIC 216 + #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) 217 + _CLOCK_MONOTONIC_RAW = 4, 218 + #define CLOCK_MONOTONIC_RAW _CLOCK_MONOTONIC_RAW 219 + _CLOCK_MONOTONIC_RAW_APPROX = 5, 220 + #define CLOCK_MONOTONIC_RAW_APPROX _CLOCK_MONOTONIC_RAW_APPROX 221 + _CLOCK_UPTIME_RAW = 8, 222 + #define CLOCK_UPTIME_RAW _CLOCK_UPTIME_RAW 223 + _CLOCK_UPTIME_RAW_APPROX = 9, 224 + #define CLOCK_UPTIME_RAW_APPROX _CLOCK_UPTIME_RAW_APPROX 225 + #endif 226 + _CLOCK_PROCESS_CPUTIME_ID = 12, 227 + #define CLOCK_PROCESS_CPUTIME_ID _CLOCK_PROCESS_CPUTIME_ID 228 + _CLOCK_THREAD_CPUTIME_ID = 16 229 + #define CLOCK_THREAD_CPUTIME_ID _CLOCK_THREAD_CPUTIME_ID 230 + } clockid_t; 231 + 232 + int clock_getres(clockid_t __clock_id, struct timespec *__res); 233 + 234 + int clock_gettime(clockid_t __clock_id, struct timespec *__tp); 235 + 236 + #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) 237 + __uint64_t clock_gettime_nsec_np(clockid_t __clock_id); 238 + #endif 239 + 240 + int clock_settime(clockid_t __clock_id, const struct timespec *__tp); 241 + 242 + #endif /* _DARWIN_FEATURE_CLOCK_GETTIME */ 243 + 244 + 207 245 //End-Libc 208 246 #endif 209 247 __END_DECLS