1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
Use the normal clocks for the raw & coarse clock for now.
vlc doesn't build when _POSIX_CLOCK_SELECTION is enabled but _POSIX_TIMERS is
not, and they refuse to fix that (see #765578), so disable the former.
---
sysdeps/mach/hurd/bits/posix_opt.h | 2 +-
sysdeps/unix/clock_gettime.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
Index: glibc-2.41/sysdeps/mach/clock_gettime.c
===================================================================
--- glibc-2.41.orig/sysdeps/mach/clock_gettime.c
+++ glibc-2.41/sysdeps/mach/clock_gettime.c
@@ -33,6 +33,8 @@ __clock_gettime (clockid_t clock_id, str
switch (clock_id) {
case CLOCK_MONOTONIC:
+ case CLOCK_MONOTONIC_RAW:
+ case CLOCK_MONOTONIC_COARSE:
/* If HAVE_HOST_GET_UPTIME64 is not defined or not available,
CLOCK_MONOTONIC will be equivalent to CLOCK_REALTIME. */
#ifdef HAVE_HOST_GET_UPTIME64
@@ -56,6 +58,7 @@ __clock_gettime (clockid_t clock_id, str
/* FALLTHROUGH */
case CLOCK_REALTIME:
+ case CLOCK_REALTIME_COARSE:
{
/* __host_get_time can only fail if passed an invalid host_t.
__mach_host_self could theoretically fail (producing an
Index: glibc-2.41/rt/timer_create.c
===================================================================
--- glibc-2.41.orig/rt/timer_create.c
+++ glibc-2.41/rt/timer_create.c
@@ -47,7 +47,7 @@ timer_create (clockid_t clock_id, struct
return -1;
}
- if (clock_id != CLOCK_REALTIME)
+ if (clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_MONOTONIC_RAW && clock_id != CLOCK_REALTIME_COARSE && clock_id != CLOCK_MONOTONIC_COARSE)
{
__set_errno (EINVAL);
return -1;
Index: glibc-2.41/sysdeps/mach/hurd/bits/posix_opt.h
===================================================================
--- glibc-2.41.orig/sysdeps/mach/hurd/bits/posix_opt.h
+++ glibc-2.41/sysdeps/mach/hurd/bits/posix_opt.h
@@ -165,8 +165,8 @@
/* The monotonic clock might be available. */
#define _POSIX_MONOTONIC_CLOCK 200809L
-/* The clock selection interfaces are available. */
-#define _POSIX_CLOCK_SELECTION 200809L
+/* The clock selection interfaces are not really available yet. */
+#define _POSIX_CLOCK_SELECTION -1
/* Advisory information interfaces could be available in future. */
#define _POSIX_ADVISORY_INFO 0
Index: glibc-2.41/sysdeps/posix/clock_getres.c
===================================================================
--- glibc-2.41.orig/sysdeps/posix/clock_getres.c
+++ glibc-2.41/sysdeps/posix/clock_getres.c
@@ -55,6 +55,10 @@ __clock_getres (clockid_t clock_id, stru
switch (clock_id)
{
case CLOCK_REALTIME:
+ case CLOCK_MONOTONIC:
+ case CLOCK_MONOTONIC_RAW:
+ case CLOCK_REALTIME_COARSE:
+ case CLOCK_MONOTONIC_COARSE:
retval = realtime_getres (res);
break;
Index: glibc-2.41/sysdeps/mach/clock_nanosleep.c
===================================================================
--- glibc-2.41.orig/sysdeps/mach/clock_nanosleep.c
+++ glibc-2.41/sysdeps/mach/clock_nanosleep.c
@@ -67,7 +67,7 @@ int
__clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
struct timespec *rem)
{
- if ((clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC)
+ if ((clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_MONOTONIC_RAW && clock_id != CLOCK_REALTIME_COARSE && clock_id != CLOCK_MONOTONIC_COARSE)
|| req->tv_sec < 0
|| !valid_nanoseconds (req->tv_nsec)
|| (flags != 0 && flags != TIMER_ABSTIME))
|