flock: fix time_t=long assumptions
This also fixes flock for archs (e.g. sparc64) where suseconds_t is not long.
Fixes: https://github.com/karelzak/util-linux/issues/1069
References: ce3355cc54
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
d8d54e4bfc
commit
4fb27d5c62
|
@ -331,9 +331,10 @@ int main(int argc, char *argv[])
|
|||
|
||||
gettime_monotonic(&time_done);
|
||||
timersub(&time_done, &time_start, &delta);
|
||||
printf(_("%s: getting lock took %ld.%06ld seconds\n"),
|
||||
program_invocation_short_name, delta.tv_sec,
|
||||
delta.tv_usec);
|
||||
printf(_("%s: getting lock took %"PRId64".%06"PRId64" seconds\n"),
|
||||
program_invocation_short_name,
|
||||
(int64_t) delta.tv_sec,
|
||||
(int64_t) delta.tv_usec);
|
||||
}
|
||||
status = EX_OK;
|
||||
|
||||
|
|
Loading…
Reference in New Issue