Merge pull request #1124 from lioncash/timeofday

x32/Time: Implement settimeofday
This commit is contained in:
Ryan Houdek authored and GitHub committed 2021-06-25 05:59:00 -07:00
commit fd8dcda67e
1 file changed
+12
+12
View File
@@ -36,6 +36,18 @@ namespace FEX::HLE::x32 {
SYSCALL_ERRNO();
});
REGISTER_SYSCALL_IMPL_X32(settimeofday, [](FEXCore::Core::CpuStateFrame *Frame, const timeval32 *tv, const struct timezone *tz) -> uint64_t {
struct timeval tv64{};
struct timeval *tv_ptr{};
if (tv) {
tv64 = *tv;
tv_ptr = &tv64;
}
const uint64_t Result = ::settimeofday(tv_ptr, tz);
SYSCALL_ERRNO();
});
REGISTER_SYSCALL_IMPL_X32(nanosleep, [](FEXCore::Core::CpuStateFrame *Frame, const timespec32 *req, timespec32 *rem) -> uint64_t {
struct timespec rem64{};
struct timespec *rem64_ptr{};