Skip to content

Commit

Permalink
Attempt to fix compilation errors on iOS and macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
anr2me committed Jul 23, 2020
1 parent b780461 commit a838a07
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Core/HLE/proAdhoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,10 @@ bool isPTPPortInUse(uint16_t port) {
char* mac2str(SceNetEtherAddr* mac) {
#if defined(_WIN32)
static __declspec(thread) char str[18] = ":::::";
#elif !PPSSPP_PLATFORM(MAC) && !PPSSPP_PLATFORM(IOS)
static __thread char str[18] = ":::::";
#else
// Temporary hack to avoid huge rebase conflicts. Remove this when applying the mac2str rewrite.
#elif PPSSPP_PLATFORM(IOS)
static char str[18] = ":::::";
#else
static __thread char str[18] = ":::::";
#endif
if (mac == NULL) return str;
snprintf(str, sizeof(str), "%02x:%02x:%02x:%02x:%02x:%02x", mac->data[0], mac->data[1], mac->data[2], mac->data[3], mac->data[4], mac->data[5]);
Expand Down Expand Up @@ -1660,10 +1659,10 @@ uint16_t getLocalPort(int sock) {
return ntohs(localAddr.sin_port);
}

int getSockMaxSize(int udpsock) {
#if !defined(SO_MAX_MSG_SIZE)
#define SO_MAX_MSG_SIZE 0x2003
#endif
int getSockMaxSize(int udpsock) {
int n = 1500; // Typical MTU size as default
socklen_t m = sizeof(n);
getsockopt(udpsock, SOL_SOCKET, SO_MAX_MSG_SIZE, (char*)&n, &m);
Expand Down

0 comments on commit a838a07

Please sign in to comment.