diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 17:39:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 17:39:32 +0000 |
commit | 38d9436103a7096b65aea78ac3ce13fde6ed3d6e (patch) | |
tree | e1c1508e82e507359d00d84e768707dad5d76ada /debian/patches/85_timer_settime.patch | |
parent | Adding upstream version 8.32. (diff) | |
download | coreutils-debian.tar.xz coreutils-debian.zip |
Adding debian version 8.32-4.debian/8.32-4debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/85_timer_settime.patch')
-rw-r--r-- | debian/patches/85_timer_settime.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/debian/patches/85_timer_settime.patch b/debian/patches/85_timer_settime.patch new file mode 100644 index 0000000..c2b2fd1 --- /dev/null +++ b/debian/patches/85_timer_settime.patch @@ -0,0 +1,28 @@ +Author: <mstone@debian.org> +Description: timeout ignores fractional part of sleep times when timeout is more +than 100000s (approximately 1 day) on kfbsd. prevents failure modes +in libc implementation when timeout approaches max(time_t) +Index: coreutils-8.24/src/timeout.c +=================================================================== +--- coreutils-8.24.orig/src/timeout.c ++++ coreutils-8.24/src/timeout.c +@@ -133,6 +133,11 @@ settimeout (double duration, bool warn) + resolution provided by alarm(). */ + + #if HAVE_TIMER_SETTIME ++#ifdef __FreeBSD_kernel__ ++if (duration < 100000) { ++#else ++if (true) { ++#endif + struct timespec ts = dtotimespec (duration); + struct itimerspec its = { {0, 0}, ts }; + timer_t timerid; +@@ -149,6 +154,7 @@ settimeout (double duration, bool warn) + } + else if (warn && errno != ENOSYS) + error (0, errno, _("warning: timer_create")); ++} + #endif + + unsigned int timeint; |