about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-05-21 20:10:14 +0200
committerptitSeb <sebastien.chev@gmail.com>2022-05-21 20:10:14 +0200
commitb0fa2f5ec098658e61108e6751df381b0c5512a2 (patch)
tree5d97b1453767b05c860aecd06d9e3a6ce9dc23f8 /src
parent6c367f4a29af2d2e55a6ebbd9072622eae89f8ae (diff)
downloadbox64-b0fa2f5ec098658e61108e6751df381b0c5512a2.tar.gz
box64-b0fa2f5ec098658e61108e6751df381b0c5512a2.zip
Added wrapped fstat64 (for #309)
Diffstat (limited to 'src')
-rw-r--r--src/wrapped/generated/functions_list.txt1
-rw-r--r--src/wrapped/generated/wrappedlibctypes.h1
-rwxr-xr-xsrc/wrapped/wrappedlibc.c1
-rwxr-xr-xsrc/wrapped/wrappedlibc_private.h1
4 files changed, 4 insertions, 0 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt
index e0c91f61..e4266f6d 100644
--- a/src/wrapped/generated/functions_list.txt
+++ b/src/wrapped/generated/functions_list.txt
@@ -2684,6 +2684,7 @@ wrappedlibc:
   - warnx
 - iFip:
   - fstat
+  - fstat64
 - iFpi:
   - __sigsetjmp
   - backtrace
diff --git a/src/wrapped/generated/wrappedlibctypes.h b/src/wrapped/generated/wrappedlibctypes.h
index 8aabf49e..77974f8b 100644
--- a/src/wrapped/generated/wrappedlibctypes.h
+++ b/src/wrapped/generated/wrappedlibctypes.h
@@ -112,6 +112,7 @@ typedef int64_t (*iFppipppp_t)(void*, void*, int64_t, void*, void*, void*, void*
 	GO(warn, vFpV_t) \
 	GO(warnx, vFpV_t) \
 	GO(fstat, iFip_t) \
+	GO(fstat64, iFip_t) \
 	GO(__sigsetjmp, iFpi_t) \
 	GO(backtrace, iFpi_t) \
 	GO(munmap, iFpL_t) \
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c
index 5e3ebd40..f066b917 100755
--- a/src/wrapped/wrappedlibc.c
+++ b/src/wrapped/wrappedlibc.c
@@ -1077,6 +1077,7 @@ EXPORT int my_fstat(x64emu_t *emu, int fd, void* buf)
     UnalignStat64(&st, buf);
     return r;
 }
+EXPORT int my_fstat64(x64emu_t* emu, int fd, void* buf) __attribute__((alias("my_fstat")));
 
 EXPORT int my_fstatat(x64emu_t *emu, int fd, const char* path, void* buf, int flags)
 {
diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h
index c1425d22..a131ae6b 100755
--- a/src/wrapped/wrappedlibc_private.h
+++ b/src/wrapped/wrappedlibc_private.h
@@ -427,6 +427,7 @@ GO(fsetpos, iFpp)
 GO(fsetpos64, iFpp)
 GO(fsetxattr, iFippLi)
 GOM(fstat, iFEip)
+GOM(fstat64, iFEip)
 GOM(fstatat, iFEippi)
 GOW(fstatfs, iFip)
 GOW(fstatfs64, iFip)