summaryrefslogtreecommitdiff
path: root/app-admin/tmpwatch/files/tmpwatch-2.11-boottime.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-admin/tmpwatch/files/tmpwatch-2.11-boottime.patch
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-admin/tmpwatch/files/tmpwatch-2.11-boottime.patch')
-rw-r--r--app-admin/tmpwatch/files/tmpwatch-2.11-boottime.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/app-admin/tmpwatch/files/tmpwatch-2.11-boottime.patch b/app-admin/tmpwatch/files/tmpwatch-2.11-boottime.patch
new file mode 100644
index 000000000000..b622c8d70e70
--- /dev/null
+++ b/app-admin/tmpwatch/files/tmpwatch-2.11-boottime.patch
@@ -0,0 +1,30 @@
+Make boot time detection failures non-fatal. Taken from PLD Linux
+
+Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=468444
+PLD bug: https://bugs.launchpad.net/pld-linux/+bug/1034364
+Patch: https://github.com/pld-linux/tmpwatch/blob/master/tmpwatch-boottime.patch
+
+--- tmpwatch-2.11/tmpwatch.c~
++++ tmpwatch-2.11/tmpwatch.c
+@@ -666,9 +666,11 @@
+ time_t boot_time;
+
+ if (clock_gettime(CLOCK_REALTIME, &real_clock) != 0
+- || clock_gettime(CLOCK_BOOTTIME, &boot_clock) != 0)
+- message(LOG_FATAL, "Error determining boot time: %s\n",
++ || clock_gettime(CLOCK_BOOTTIME, &boot_clock) != 0) {
++ message(LOG_DEBUG, "Error determining boot time: %s\n",
+ strerror(errno));
++ socket_kill_time = 0; /* Never remove sockets */
++ } else {
+ boot_time = real_clock.tv_sec - boot_clock.tv_sec;
+ if (real_clock.tv_nsec < boot_clock.tv_nsec)
+ boot_time--;
+@@ -677,6 +679,7 @@
+ boot_time -= 2;
+
+ socket_kill_time = boot_time - grace_seconds;
++ }
+ #else
+ socket_kill_time = 0; /* Never remove sockets */
+ #endif