]> git.pld-linux.org Git - packages/thermal-daemon.git/commitdiff
make printing time_t more portable
authorJan Palus <atler@pld-linux.org>
Mon, 29 Jun 2020 17:27:50 +0000 (19:27 +0200)
committerJan Palus <atler@pld-linux.org>
Mon, 29 Jun 2020 17:27:50 +0000 (19:27 +0200)
print-time_t.patch [new file with mode: 0644]
thermal-daemon.spec

diff --git a/print-time_t.patch b/print-time_t.patch
new file mode 100644 (file)
index 0000000..99a0878
--- /dev/null
@@ -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);
+ }
index 22ab883f7aff0fea96e0a8433f95cd895dcb6bb2..96925425d3e60de18749efd4db9ee43aabb34c8d 100644 (file)
@@ -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
This page took 0.143034 seconds and 4 git commands to generate.