From e7513c3862839be67c9aa924ffdfbe0049606bef Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 17 Apr 2021 14:22:19 +0200 Subject: [PATCH] Compile with latest wut and WUPS 0.5 --- Dockerfile | 4 ++-- src/utils/TcpReceiver.cpp | 10 +++++----- src/utils/net.h | 12 +++++++++++- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9d0ac77..fb1f560 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM wiiuenv/devkitppc:20210101 +FROM wiiuenv/devkitppc:20210414 COPY --from=wiiuenv/libwupsbackend:202101101720554d1bfe /artifacts $DEVKITPRO COPY --from=wiiuenv/librpxloader:20210116 /artifacts $DEVKITPRO -COPY --from=wiiuenv/wiiupluginsystem:20210316 /artifacts $DEVKITPRO +COPY --from=wiiuenv/wiiupluginsystem:20210417 /artifacts $DEVKITPRO WORKDIR project \ No newline at end of file diff --git a/src/utils/TcpReceiver.cpp b/src/utils/TcpReceiver.cpp index 99cafaa..b54809a 100644 --- a/src/utils/TcpReceiver.cpp +++ b/src/utils/TcpReceiver.cpp @@ -67,12 +67,12 @@ void TcpReceiver::executeThread() { socklen_t len; int32_t ret; if ((ret = bind(serverSocket, (struct sockaddr *) &bindAddress, 16)) < 0) { - socketclose(serverSocket); + close(serverSocket); return; } if ((ret = listen(serverSocket, 1)) < 0) { - socketclose(serverSocket); + close(serverSocket); return; } @@ -88,19 +88,19 @@ void TcpReceiver::executeThread() { //serverReceiveStart(this, ipAddress); int32_t result = loadToMemory(clientSocket, ipAddress); //serverReceiveFinished(this, ipAddress, result); - socketclose(clientSocket); + close(clientSocket); if (result > 0) if (result >= 0){ break; } } else { - DEBUG_FUNCTION_LINE("Server socket accept failed %i %d", clientSocket, wiiu_geterrno()); + DEBUG_FUNCTION_LINE("Server socket accept failed %i %d", clientSocket, errno); OSSleepTicks(OSMicrosecondsToTicks(100000)); } } - socketclose(serverSocket); + close(serverSocket); } diff --git a/src/utils/net.h b/src/utils/net.h index ac1befa..3665713 100644 --- a/src/utils/net.h +++ b/src/utils/net.h @@ -2,12 +2,22 @@ #define _UTILS_NET_H_ #include -#include #ifdef __cplusplus extern "C" { #endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + int32_t recvwait(int32_t sock, void *buffer, int32_t len); uint8_t recvbyte(int32_t sock);