aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2012-02-14 09:34:48 +0100
committerTobias Brunner <tobias@strongswan.org>2012-02-14 09:38:00 +0100
commit0f7d381cfecdbdfcd8d6e7523d5df40181971296 (patch)
tree2da83e4d39df31183fc607f959e91203f5710da8 /src
parent7efde9011e9ef68361dfe0860d98a19847617db1 (diff)
downloadstrongswan-0f7d381cfecdbdfcd8d6e7523d5df40181971296.tar.bz2
strongswan-0f7d381cfecdbdfcd8d6e7523d5df40181971296.tar.xz
pluto: Print expiry time more properly.
Diffstat (limited to 'src')
-rw-r--r--src/pluto/defs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pluto/defs.c b/src/pluto/defs.c
index 404194b81..7f3a819de 100644
--- a/src/pluto/defs.c
+++ b/src/pluto/defs.c
@@ -16,6 +16,7 @@
#include <string.h>
#include <stdio.h>
#include <dirent.h>
+#include <inttypes.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -124,8 +125,8 @@ check_expiry(time_t expiration_date, int warning_interval, bool strict)
time_left /= 60;
unit = "minute";
}
- snprintf(buf, 35, "warning (expires in %d %s%s)", time_left,
- unit, (time_left == 1)?"":"s");
+ snprintf(buf, 35, "warning (expires in %" PRIu64 " %s%s)",
+ (u_int64_t)time_left, unit, (time_left == 1) ? "" : "s");
return buf;
}
}