From 844282068bb6e60ffb47b4323933e22ad0f26bb1 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Mon, 29 Jun 2020 19:27:50 +0200 Subject: [PATCH] make printing time_t more portable --- print-time_t.patch | 14 ++++++++++++++ thermal-daemon.spec | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 print-time_t.patch diff --git a/print-time_t.patch b/print-time_t.patch new file mode 100644 index 0000000..99a0878 --- /dev/null +++ b/print-time_t.patch @@ -0,0 +1,14 @@ +--- thermal_daemon-2.2/src/main.cpp.orig 2020-06-06 01:02:24.000000000 +0200 ++++ thermal_daemon-2.2/src/main.cpp 2020-06-29 19:26:49.136677166 +0200 +@@ -121,9 +121,9 @@ + seconds = time(NULL); + + if (thd_daemonize) +- syslog(syslog_priority, "[%ld]%s%s", seconds, prefix, message); ++ syslog(syslog_priority, "[%lld]%s%s", (long long) seconds, prefix, message); + else +- g_print("[%ld]%s%s", seconds, prefix, message); ++ g_print("[%lld]%s%s", (long long) seconds, prefix, message); + + } + diff --git a/thermal-daemon.spec b/thermal-daemon.spec index 22ab883..9692542 100644 --- a/thermal-daemon.spec +++ b/thermal-daemon.spec @@ -7,6 +7,7 @@ License: GPL v2+ Group: Base Source0: https://github.com/01org/thermal_daemon/archive/v%{version}/%{name}-%{version}.tar.gz # Source0-md5: 4e86f9c2fedcdfc10bb2654edcc96414 +Patch0: print-time_t.patch URL: https://github.com/01org/thermal_daemon BuildRequires: autoconf >= 2.50 BuildRequires: automake >= 1:1.11 @@ -32,6 +33,7 @@ Thermal Daemon monitoruje i kontroluje temperaturę komputera. %prep %setup -q -n thermal_daemon-%{version} +%patch0 -p1 %build install -d build-aux -- 2.44.0