Merge pull request #5936 from clienthax/ps3res

More ps3 networking fixs.
This commit is contained in:
Twinaphex 2017-12-19 23:02:14 +01:00 committed by GitHub
commit 5eb6c5dae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -156,8 +156,10 @@ static INLINE bool isagain(int bytes)
if (WSAGetLastError() != WSAEWOULDBLOCK)
return false;
return true;
#elif defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
return (sys_net_errno == SYS_NET_EWOULDBLOCK) || (sys_net_errno == SYS_NET_EAGAIN);//35
#elif defined(VITA)
return (bytes<0 && (bytes == SCE_NET_ERROR_EAGAIN || bytes == SCE_NET_ERROR_EWOULDBLOCK));
return (bytes<0 && (bytes == SCE_NET_ERROR_EAGAIN || bytes == SCE_NET_ERROR_EWOULDBLOCK));
#elif defined(WIIU)
return (bytes == -1) && ((socketlasterr() == SO_SUCCESS) || (socketlasterr() == SO_EWOULDBLOCK));
#else

View File

@ -193,12 +193,6 @@ int getaddrinfo_retro(const char *node, const char *service,
in_addr->sin_family = AF_INET;
in_addr->sin_port = inet_htons(strtoul(service, NULL, 0));
//sin_port seems to be the wrong endian for ps3
#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
in_addr->sin_port = (in_addr->sin_port>>8) | (in_addr->sin_port<<8);
#endif
if (!node && (hints->ai_flags & AI_PASSIVE))
in_addr->sin_addr.s_addr = INADDR_ANY;
else if (node && isdigit(*node))