mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-25 19:44:57 +00:00
Readd hack in posix_close
It's either this, or removing LLE DiscMap. Or shadow implements posix sockets.
This commit is contained in:
parent
671cbfbbd0
commit
55790e37e8
@ -182,6 +182,12 @@ s32 PS4_SYSV_ABI sceKernelOpen(const char* path, s32 flags, /* SceKernelMode*/ u
|
|||||||
}
|
}
|
||||||
|
|
||||||
s32 PS4_SYSV_ABI posix_close(s32 fd) {
|
s32 PS4_SYSV_ABI posix_close(s32 fd) {
|
||||||
|
if (fd == 0) {
|
||||||
|
// Hack to bypass unimplemented posix_socket in LLE libSceDiscMap
|
||||||
|
// Without this, it closes stdin because socket returns fd 0
|
||||||
|
*__Error() = POSIX_EBADF;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
auto* h = Common::Singleton<Core::FileSys::HandleTable>::Instance();
|
auto* h = Common::Singleton<Core::FileSys::HandleTable>::Instance();
|
||||||
auto* file = h->GetFile(fd);
|
auto* file = h->GetFile(fd);
|
||||||
if (file == nullptr) {
|
if (file == nullptr) {
|
||||||
|
Loading…
Reference in New Issue
Block a user