This is needed to run Python on the Hurd, especially during the build of python-boot0. Adapted from https://salsa.debian.org/glibc-team/glibc/-/blob/glibc-2.31/debian/patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff Use the realtime clock for the monotonic clock. This is of course not a proper implementation (which is being done in Mach), but will permit to fix at least the iceweasel stack. vlc however 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. From 0aa1dfd580cf9ad7b812c307b128decb782b825f Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 2 Mar 2020 18:59:04 +0100 Subject: [PATCH 2/2] Use realtime clock for the monotonic clock. --- sysdeps/mach/clock_gettime.c | 2 +- sysdeps/mach/hurd/bits/posix_opt.h | 6 +++--- sysdeps/posix/clock_getres.c | 1 + sysdeps/pthread/timer_create.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sysdeps/mach/clock_gettime.c b/sysdeps/mach/clock_gettime.c index 6862fc8c..be1449bf 100644 --- a/sysdeps/mach/clock_gettime.c +++ b/sysdeps/mach/clock_gettime.c @@ -32,6 +32,7 @@ __clock_gettime (clockid_t clock_id, struct timespec *ts) switch (clock_id) { case CLOCK_REALTIME: + case CLOCK_MONOTONIC: { /* __host_get_time can only fail if passed an invalid host_t. __mach_host_self could theoretically fail (producing an diff --git a/sysdeps/mach/hurd/bits/posix_opt.h b/sysdeps/mach/hurd/bits/posix_opt.h index 0050151332..27b3a28ab7 100644 --- a/sysdeps/mach/hurd/bits/posix_opt.h +++ b/sysdeps/mach/hurd/bits/posix_opt.h @@ -163,10 +163,10 @@ #define _POSIX_THREAD_PROCESS_SHARED -1 /* The monotonic clock might be available. */ -#define _POSIX_MONOTONIC_CLOCK 0 +#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 diff --git a/sysdeps/posix/clock_getres.c b/sysdeps/posix/clock_getres.c index fcd79fd554..1dd02aa449 100644 --- a/sysdeps/posix/clock_getres.c +++ b/sysdeps/posix/clock_getres.c @@ -52,6 +52,7 @@ __clock_getres (clockid_t clock_id, struct timespec *res) switch (clock_id) { case CLOCK_REALTIME: + case CLOCK_MONOTONIC: retval = realtime_getres (res); break; diff --git a/sysdeps/pthread/timer_create.c b/sysdeps/pthread/timer_create.c index 9d8a9ea8ae..3430582c09 100644 --- a/rt/timer_create.c +++ b/rt/timer_create.c @@ -48,7 +48,7 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid) return -1; } - if (clock_id != CLOCK_REALTIME) + if (clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC) { __set_errno (EINVAL); return -1; -- 2.24.0 s. Update environment variables. Ignore tlp-rdw man pages. * gnu/services/pm.scm (tlp-activation): Update configuration file name. Nicolas Goaziou 2019-08-26services: tlp, thermald: Add descriptions....* gnu/services/pm.scm (tlp-service-type)[description]: New field. (thermald-service-type)[description]: New field. Ludovic Courtès 2018-06-20services: Fix GPLv3 header in cuirass and pm modules....* gnu/services/cuirass.scm, gnu/services/pm.scm: Adjust to canonical GPLv3 header used throughout Guix. Signed-off-by: Leo Famulari <leo@famulari.name> Nils Gillmann 2017-05-14services: Add 'thermald-service-type'....* gnu/services/pm.scm (<thermald-configuration>): New record type. (thermald-shepherd-service, thermald-service-type): New variables. * doc/guix.texi (Thermal Management): New section documenting thermald. Christopher Allan Webber 2017-04-16services: Add a default value to various service types....* gnu/services/admin.scm (rottlog-service-type)[default-value]: New field. * gnu/services/base.scm (guix-service-type)[default-value]: New field. (guix-publish-service-type)[default-value]: New field. * gnu/services/cups.scm (cups-service-type)[default-value]: New field. * gnu/services/dict.scm (dicod-service-type)[default-value]: New field. * gnu/services/mcron.scm (mcron-service-type)[default-value]: New field. * gnu/services/networking.scm (<tor-configuration>)[config-file]: Add default value. (tor-service-type)[default-value]: New field. (<bitlbee-configuration>)[interface, port, extra-settings]: Add default values. (bitlbee-service-type)[default-value]: New field. (wpa-supplicant-service-type)[default-value]: New field. (tlp-service-type)[default-value]: New field. (openssh-service-type)[default-value]: New field. * doc/guix.texi (Base Services, Log Rotation) (Networking Services, Printing Services): (Power management Services): Adjust examples accordingly. Ludovic Courtès 2017-03-31doc: Fix typos....* doc/guix.texi (Build Systems)[ocaml-build-system]: Fix typo. (Log Rotation)[periodic-rotations]: ditto. (Database Services)[redis-service-type]: ditto. (OpenSMTPD Service)[opensmtpd-configuration]: ditto. (VPN Services)[OpenVPN]: ditto. (Power management Services)[tlp-configuration]: ditto. (Git daemon service)[git-daemon-service]: ditto. (Running GuixSD in a VM): ditto. * gnu/services/pm.scm (tlp-configuration)[runtime-pm-blacklist]: Fix typo. * gnu/services/vpn.scm (openvpn-client-configuration)[status]: ditto. Eric Bavier 2017-03-24gnu: Add tlp service....* gnu/services/pm.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add gnu/services/tlp.scm. * doc/guix.texi (Power management Services): New section. Signed-off-by: Clément Lassieur <clement@lassieur.org> Mathieu Othacehe