]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Fix build failure on sparc
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 24 Oct 2013 02:04:52 +0000 (22:04 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 24 Oct 2013 02:04:52 +0000 (22:04 -0400)
Signed-off-by: Thomas Nemeth <thomas.nemeth@laposte.net>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/log.c

index 2da8b32240341b04b918de433d04b4c40dc8c061..6b248d3dc2eb6ceeaac4d96c1b84ce0dc098e6c0 100644 (file)
@@ -71,15 +71,17 @@ static int log_append_logfile(const struct lxc_log_appender *appender,
 {
        char buffer[LXC_LOG_BUFFER_SIZE];
        int n;
+       int ms;
 
        if (lxc_log_fd == -1)
                return 0;
 
+       ms = event->timestamp.tv_usec / 1000;
        n = snprintf(buffer, sizeof(buffer),
-                    "%15s %10ld.%03ld %-8s %s - ",
+                    "%15s %10ld.%03d %-8s %s - ",
                     log_prefix,
                     event->timestamp.tv_sec,
-                    event->timestamp.tv_usec / 1000,
+                    ms,
                     lxc_log_priority_to_string(event->priority),
                     event->category);