systemd/0042-timesync-timesyncd-manager-fix-format-specifier-issu.patch
Zbigniew Jędrzejewski-Szmek d743bb5bcc Revert "Build with meson"
This reverts commits 3fb4a15096
and 0e8350ca14.

Either building with meson or other upstream changes was causing
issues with booting, and I didn't have time to debug this properly.
2017-06-27 13:42:28 -04:00

31 lines
1.4 KiB
Diff

From 416ca19f3149e44fee7fee2df9b8e63042076fda Mon Sep 17 00:00:00 2001
From: Matija Skala <mskala@gmx.com>
Date: Fri, 19 May 2017 14:36:40 +0200
Subject: [PATCH] timesync/timesyncd-manager: fix format-specifier issue
timex::time::tv_sec can have different sizes depending on the
host architecture. On x32 in particular, it is 8 bytes
long while the long int type is only 4 bytes long. Hence,
using li as a format specifier will trigger a format
error. Thus, better use PRI_TIME instead of li which is
actually the right format specifier to use for time_t.
(cherry picked from commit 0060bb8f5bbad433bc29405cc76b955d3125d8e9)
---
src/timesync/timesyncd-manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c
index 11c495e291..ae8514550a 100644
--- a/src/timesync/timesyncd-manager.c
+++ b/src/timesync/timesyncd-manager.c
@@ -378,7 +378,7 @@ static int manager_adjust_clock(Manager *m, double offset, int leap_sec) {
m->drift_ppm = tmx.freq / 65536;
log_debug(" status : %04i %s\n"
- " time now : %li.%03"PRI_USEC"\n"
+ " time now : %"PRI_TIME".%03"PRI_USEC"\n"
" constant : %"PRI_TIMEX"\n"
" offset : %+.3f sec\n"
" freq offset : %+"PRI_TIMEX" (%i ppm)\n",