Merge pull request #194 from Sonicadvance1/fix_getcwd

Changes getcwd to use the syscall directly.
This commit is contained in:
Stefanos Kornilios Mitsis Poiitidis authored and GitHub committed 2020-05-25 17:10:28 +03:00
commit cd4e29f83f
1 file changed
+3 -2
+3 -2
View File
@@ -3,6 +3,7 @@
#include <stddef.h>
#include <stdint.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/vfs.h>
#include <unistd.h>
@@ -13,8 +14,8 @@ struct InternalThreadState;
namespace FEXCore::HLE {
uint64_t Getcwd(FEXCore::Core::InternalThreadState *Thread, char *buf, size_t size) {
uint64_t Result = reinterpret_cast<uint64_t>(::getcwd(buf, size));
SYSCALL_ERRNO_NULL();
uint64_t Result = syscall(SYS_getcwd, buf, size);
SYSCALL_ERRNO();
}
uint64_t Chdir(FEXCore::Core::InternalThreadState *Thread, const char *path) {