Replace __gh_errno_ptr() by socketlasterr()

This commit is contained in:
Maschell 2018-06-19 17:35:47 +02:00
parent 03d827c436
commit ae5fbd4f84
3 changed files with 2 additions and 7 deletions

View File

@ -22,8 +22,6 @@
#include <wut_types.h> #include <wut_types.h>
extern int32_t * (* __gh_errno_ptr)(void);
#include <padscore/kpad.h> #include <padscore/kpad.h>
#include <padscore/wpad.h> #include <padscore/wpad.h>
#include <vpad/input.h> #include <vpad/input.h>

View File

@ -21,8 +21,6 @@
#include <utils/logger.h> #include <utils/logger.h>
#define wiiu_errno (*__gh_errno_ptr())
CPTCPServer * CPTCPServer::instance = NULL; CPTCPServer * CPTCPServer::instance = NULL;
CPTCPServer::CPTCPServer(s32 port): TCPServer(port,CPTCPServer::getPriority()) { CPTCPServer::CPTCPServer(s32 port): TCPServer(port,CPTCPServer::getPriority()) {
@ -83,7 +81,7 @@ bool CPTCPServer::whileLoop() {
} }
ret = checkbyte(clientfd); ret = checkbyte(clientfd);
if (ret < 0) { if (ret < 0) {
if(wiiu_errno != 6) { if(socketlasterr() != 6) {
return false; return false;
} }
OSSleepTicks(OSMicrosecondsToTicks(1000)); OSSleepTicks(OSMicrosecondsToTicks(1000));

View File

@ -22,7 +22,6 @@
#include <utils/logger.h> #include <utils/logger.h>
#define MAX_UDP_SIZE 0x578 #define MAX_UDP_SIZE 0x578
#define wiiu_errno (*__gh_errno_ptr())
CThread * UDPServer::pThread = NULL; CThread * UDPServer::pThread = NULL;
UDPServer * UDPServer::instance = NULL; UDPServer * UDPServer::instance = NULL;
@ -103,7 +102,7 @@ void UDPServer::DoUDPThreadInternal(){
memset(buffer,0,MAX_UDP_SIZE); memset(buffer,0,MAX_UDP_SIZE);
n = recv(sockfd,buffer,MAX_UDP_SIZE,0); n = recv(sockfd,buffer,MAX_UDP_SIZE,0);
if (n < 0){ if (n < 0){
s32 errno_ = wiiu_errno; s32 errno_ = socketlasterr();
OSSleepTicks(OSMicrosecondsToTicks(2000)); OSSleepTicks(OSMicrosecondsToTicks(2000));
if(errno_ != 11 && errno_ != 9){ if(errno_ != 11 && errno_ != 9){
break; break;