summaryrefslogtreecommitdiff
path: root/Userland/Utilities/w.cpp
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-05-02 00:00:52 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-03 08:42:39 +0200
commitb613817bcaada76f75289129e4987eafdaff6d87 (patch)
tree51978a2c44f29e0b730773e83d3eb368dd4a597e /Userland/Utilities/w.cpp
parentfdbe66a7b4b3fec0beba0eac8b78bf29841a5e9c (diff)
downloadserenity-b613817bcaada76f75289129e4987eafdaff6d87.zip
Userland: Fix 64-bit portability issues
Diffstat (limited to 'Userland/Utilities/w.cpp')
-rw-r--r--Userland/Utilities/w.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Utilities/w.cpp b/Userland/Utilities/w.cpp
index a9454a3a8c..14158ccf7c 100644
--- a/Userland/Utilities/w.cpp
+++ b/Userland/Utilities/w.cpp
@@ -10,6 +10,7 @@
#include <LibCore/DateTime.h>
#include <LibCore/File.h>
#include <LibCore/ProcessStatisticsReader.h>
+#include <inttypes.h>
#include <pwd.h>
#include <stdio.h>
#include <sys/stat.h>
@@ -87,7 +88,7 @@ int main()
if (stat(tty.characters(), &st) == 0) {
auto idle_time = now - st.st_mtime;
if (idle_time >= 0) {
- builder.appendf("%llds", idle_time);
+ builder.appendf("%" PRIi64 "s", idle_time);
idle_string = builder.to_string();
}
}