mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-04 17:47:03 +03:00
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.
This commit is contained in:
parent
3bd7ef833c
commit
0060bb8f5b
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user