about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-11-01 13:19:44 +0100
committerptitSeb <sebastien.chev@gmail.com>2021-11-01 13:19:44 +0100
commitfbd9604dc12f0a0d621a3b3b67193d607a359f6e (patch)
treeb5055e389c42bcdc8901d6d05142eea11423632c /src
parent5494d417c03b862a6115a133051bbe41b57b0963 (diff)
downloadbox64-fbd9604dc12f0a0d621a3b3b67193d607a359f6e.tar.gz
box64-fbd9604dc12f0a0d621a3b3b67193d607a359f6e.zip
Added handling of ARCH_GET_FS to arch_prctl
Diffstat (limited to 'src')
-rwxr-xr-xsrc/emu/x64tls.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/emu/x64tls.c b/src/emu/x64tls.c
index 38c529bb..6ed576e2 100755
--- a/src/emu/x64tls.c
+++ b/src/emu/x64tls.c
@@ -153,6 +153,9 @@ int my_arch_prctl(x64emu_t *emu, int code, void* addr)
             my_context->segtls[3].present = 1;
             pthread_setspecific(my_context->segtls[3].key, (void*)my_context->segtls[3].base);
             return 0;
+        case ARCH_GET_FS:
+            *(void**)addr = GetSegmentBase(emu->segs[_FS]);
+            return 0;
     }
     // other are unsupported
     printf_log(LOG_INFO, "warning, call to unsupported arch_prctl(0x%x, %p)\n", code, addr);