Skip to content

Commit

Permalink
net: Stub sceNetErrnoLoc (shadps4-emu#1271)
Browse files Browse the repository at this point in the history
  • Loading branch information
dima-xd authored Oct 6, 2024
1 parent 3c0255b commit 75c92a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/core/libraries/network/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

namespace Libraries::Net {

static thread_local int32_t net_errno = 0;

int PS4_SYSV_ABI in6addr_any() {
LOG_ERROR(Lib_Net, "(STUBBED) called");
return ORBIS_OK;
Expand Down Expand Up @@ -563,9 +565,9 @@ int PS4_SYSV_ABI sceNetEpollWait() {
return ORBIS_OK;
}

int PS4_SYSV_ABI sceNetErrnoLoc() {
int* PS4_SYSV_ABI sceNetErrnoLoc() {
LOG_ERROR(Lib_Net, "(STUBBED) called");
return ORBIS_OK;
return &net_errno;
}

int PS4_SYSV_ABI sceNetEtherNtostr() {
Expand Down
2 changes: 1 addition & 1 deletion src/core/libraries/network/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ int PS4_SYSV_ABI sceNetEpollControl();
int PS4_SYSV_ABI sceNetEpollCreate();
int PS4_SYSV_ABI sceNetEpollDestroy();
int PS4_SYSV_ABI sceNetEpollWait();
int PS4_SYSV_ABI sceNetErrnoLoc();
int* PS4_SYSV_ABI sceNetErrnoLoc();
int PS4_SYSV_ABI sceNetEtherNtostr();
int PS4_SYSV_ABI sceNetEtherStrton();
int PS4_SYSV_ABI sceNetEventCallbackCreate();
Expand Down

0 comments on commit 75c92a7

Please sign in to comment.