about summary refs log tree commit diff stats
path: root/src/wrapped
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-07-06 22:24:52 +0200
committerptitSeb <sebastien.chev@gmail.com>2021-07-06 22:24:52 +0200
commitd612656978d51dc1cebd1452f0c9845dc25c1a4e (patch)
tree060ee527f9aea8dc6397be14bd2be4d6ffda9abb /src/wrapped
parent91787c4dbfdbf1c6b4b284de2bbade03f15ed8d1 (diff)
downloadbox64-d612656978d51dc1cebd1452f0c9845dc25c1a4e.tar.gz
box64-d612656978d51dc1cebd1452f0c9845dc25c1a4e.zip
Added syscall 6 and fixed syscall 5 (for #14)
Diffstat (limited to 'src/wrapped')
-rwxr-xr-xsrc/wrapped/wrappedlibc.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c
index f27c15e4..b3552cf7 100755
--- a/src/wrapped/wrappedlibc.c
+++ b/src/wrapped/wrappedlibc.c
@@ -962,6 +962,24 @@ EXPORT int my_stat(x64emu_t *emu, void* filename, void* buf)
     return r;
 }
 
+EXPORT int my_lstat(x64emu_t *emu, void* filename, void* buf)
+{
+    (void)emu;
+    struct stat64 st;
+    int r = lstat(filename, (struct stat*)&st);
+    UnalignStat64(&st, buf);
+    return r;
+}
+
+EXPORT int my_fstat(x64emu_t *emu, int fd, void* buf)
+{
+    (void)emu;
+    struct stat64 st;
+    int r = fstat(fd, (struct stat*)&st);
+    UnalignStat64(&st, buf);
+    return r;
+}
+
 EXPORT int my__IO_file_stat(x64emu_t* emu, void* f, void* buf)
 {
     struct stat64 st;