mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-04 01:33:20 +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
1 changed files with 6 additions and 0 deletions
|
@ -182,6 +182,12 @@ s32 PS4_SYSV_ABI sceKernelOpen(const char* path, s32 flags, /* SceKernelMode*/ u
|
|||
}
|
||||
|
||||
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* file = h->GetFile(fd);
|
||||
if (file == nullptr) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue