chiark / gitweb /
nss-util: be a tiny bit more compatible with glibc's lookup behaviour regarding IPv6
[elogind.git] / src / shared / logs-show.c
index c3578ac9181ca65d63177bf57b3dafbb4210407c..8edf4087c68f337ab76aed2c85f9d9a9dd0448e7 100644 (file)
@@ -301,8 +301,8 @@ static int output_short(
                 }
 
                 fprintf(f, "[%5llu.%06llu]",
-                        t / USEC_PER_SEC,
-                        t % USEC_PER_SEC);
+                        (unsigned long long) (t / USEC_PER_SEC),
+                        (unsigned long long) (t % USEC_PER_SEC));
 
                 n += 1 + 5 + 1 + 6 + 1;
 
@@ -335,7 +335,7 @@ static int output_short(
                         r = strftime(buf, sizeof(buf), "%b %d %H:%M:%S", localtime_r(&t, &tm));
                         if (r > 0) {
                                 snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
-                                         ".%06llu", x % USEC_PER_SEC);
+                                         ".%06llu", (unsigned long long) (x % USEC_PER_SEC));
                         }
                         break;
                 default: