This patch uses PRIu64 and PRId64 macros from inttypes.h to have a correct definition of 64 bit integer format for 64bits and 32bits arch. Signed-off-by: Eric Leblond <eric@xxxxxx> --- util/db.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/util/db.c b/util/db.c index 68dcc31..61c31a3 100644 --- a/util/db.c +++ b/util/db.c @@ -32,6 +32,7 @@ #include <netinet/in.h> #include <arpa/inet.h> #include <time.h> +#include <inttypes.h> #include <ulogd/ulogd.h> #include <ulogd/db.h> @@ -254,7 +255,7 @@ static int __interp_db(struct ulogd_pluginstance *upi) sprintf(di->stmt_ins, "%d,", res->u.value.i32); break; case ULOGD_RET_INT64: - sprintf(di->stmt_ins, "%lld,", res->u.value.i64); + sprintf(di->stmt_ins, "%" PRId64 ",", res->u.value.i64); break; case ULOGD_RET_UINT8: sprintf(di->stmt_ins, "%u,", res->u.value.ui8); @@ -268,7 +269,7 @@ static int __interp_db(struct ulogd_pluginstance *upi) sprintf(di->stmt_ins, "%u,", res->u.value.ui32); break; case ULOGD_RET_UINT64: - sprintf(di->stmt_ins, "%llu,", res->u.value.ui64); + sprintf(di->stmt_ins, "%" PRIu64 ",", res->u.value.ui64); break; case ULOGD_RET_BOOL: sprintf(di->stmt_ins, "'%d',", res->u.value.b); -- 1.5.4.3 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html