Make VFS host build work again.

This commit is contained in:
Andreas Kling 2018-10-17 12:23:19 +02:00
parent 39fa1eb2c2
commit 7580ac576f
Notes: sideshowbarker 2024-07-19 18:47:01 +09:00
3 changed files with 5 additions and 2 deletions

View file

@ -5,4 +5,5 @@
#else
#include <cstdio>
#define kprintf printf
#define ksprintf sprintf
#endif

View file

@ -18,13 +18,14 @@ typedef dword gid_t;
#ifdef SERENITY_KERNEL
// FIXME: Support 64-bit offsets!
typedef signed_dword off_t;
typedef unsigned int time_t;
#else
typedef signed_qword off_t;
typedef ::time_t time_t;
#endif
typedef dword blksize_t;
typedef dword blkcnt_t;
typedef unsigned int time_t;
typedef dword size_t;
typedef signed_dword ssize_t;

View file

@ -267,7 +267,8 @@ void VirtualFileSystem::listDirectory(const String& path)
}
kprintf("\033[30;1m");
auto tm = *klocaltime(&metadata.mtime);
time_t mtime = metadata.mtime;
auto tm = *klocaltime(&mtime);
kprintf("%04u-%02u-%02u %02u:%02u:%02u ",
tm.tm_year + 1900,
tm.tm_mon + 1,