about summary refs log tree commit diff stats
path: root/src/wrapped32/wrappedlibc.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-08-30 15:59:07 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-08-30 15:59:07 +0200
commit7ecdced4860d12b8f484e0b222d08192be4a56eb (patch)
tree99bc64ddda5255926398855eebf8ce248913296b /src/wrapped32/wrappedlibc.c
parent13b72df762476b13a6bc6e1cb1e7fa622068224d (diff)
downloadbox64-7ecdced4860d12b8f484e0b222d08192be4a56eb.tar.gz
box64-7ecdced4860d12b8f484e0b222d08192be4a56eb.zip
[BOX32] Added more 32bits wrapped function and fixes
Diffstat (limited to 'src/wrapped32/wrappedlibc.c')
-rwxr-xr-xsrc/wrapped32/wrappedlibc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/wrapped32/wrappedlibc.c b/src/wrapped32/wrappedlibc.c
index 85801bda..5e67f57e 100755
--- a/src/wrapped32/wrappedlibc.c
+++ b/src/wrapped32/wrappedlibc.c
@@ -2067,6 +2067,20 @@ EXPORT void* my32_localtime_r(x64emu_t* emu, void* t, void* res)
     return NULL;
 }
 
+EXPORT void* my32_gmtime_r(x64emu_t* emu, void* t, void* res)
+{
+    struct_L_t t_ = {0};
+    struct_iiiiiiiiilt_t res_ = {0};
+    if(t) from_struct_L(&t_, to_ptrv(t));
+    if(res) from_struct_iiiiiiiiilt(&res_, to_ptrv(res));
+    void* ret = gmtime_r(t?((void*)&t_):NULL, res?((void*)&res_):NULL);
+    if(ret==&res_) {
+        to_struct_iiiiiiiiilt(to_ptrv(res), &res_);
+        return res;
+    }
+    return NULL;
+}
+
 #if 0
 EXPORT int32_t my32_getrandom(x64emu_t* emu, void* buf, uint32_t buflen, uint32_t flags)
 {