]>
Commit | Line | Data |
---|---|---|
d87fbc13 GP |
1 | diff -urN lxc-2.1.1-orig/src/lxc/log.c lxc-2.1.1/src/lxc/log.c |
2 | --- lxc-2.1.1-orig/src/lxc/log.c 2017-10-19 19:08:34.000000000 +0200 | |
3 | +++ lxc-2.1.1/src/lxc/log.c 2018-03-24 13:42:08.659166630 +0100 | |
4 | @@ -222,7 +222,11 @@ | |
216742cb JR |
5 | seconds = (time->tv_sec - d_in_s - h_in_s - (minutes * 60)); |
6 | ||
7 | /* Make string from nanoseconds. */ | |
d87fbc13 GP |
8 | + #ifdef __ILP32__ |
9 | + ret = snprintf(nanosec, LXC_NUMSTRLEN64, "%lld", (int64_t)time->tv_nsec); | |
10 | + #else | |
11 | ret = snprintf(nanosec, LXC_NUMSTRLEN64, "%"PRId64, (int64_t)time->tv_nsec); | |
12 | + #endif | |
216742cb JR |
13 | if (ret < 0 || ret >= LXC_NUMSTRLEN64) |
14 | return -1; | |
15 |