mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-20 00:31:28 +00:00
Fix non-Windows build.
This commit is contained in:
parent
7e111f6fc5
commit
a06cbd6784
@ -14,6 +14,12 @@
|
|||||||
#include <sys/filio.h>
|
#include <sys/filio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define IS_EAGAIN(e) ((e) == WSAEINTR || (e) == EAGAIN)
|
||||||
|
#else
|
||||||
|
#define IS_EAGAIN(e) ((e) == EAGAIN)
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
so_init()
|
so_init()
|
||||||
{
|
{
|
||||||
@ -161,7 +167,7 @@ soread(so)
|
|||||||
#endif
|
#endif
|
||||||
if (nn <= 0) {
|
if (nn <= 0) {
|
||||||
int error = WSAGetLastError();
|
int error = WSAGetLastError();
|
||||||
if (nn < 0 && (error == WSAEINTR || error == EAGAIN))
|
if (nn < 0 && IS_EAGAIN(error))
|
||||||
return 0;
|
return 0;
|
||||||
else {
|
else {
|
||||||
DEBUG_MISC((dfd, " --- soread() disconnected, nn = %d, errno = %d-%s\n", nn, errno,strerror(errno)));
|
DEBUG_MISC((dfd, " --- soread() disconnected, nn = %d, errno = %d-%s\n", nn, errno,strerror(errno)));
|
||||||
@ -348,7 +354,7 @@ sowrite(so)
|
|||||||
/* This should never happen, but people tell me it does *shrug* */
|
/* This should never happen, but people tell me it does *shrug* */
|
||||||
if (nn < 0) {
|
if (nn < 0) {
|
||||||
int error = WSAGetLastError();
|
int error = WSAGetLastError();
|
||||||
if (error == EAGAIN || error == WSAEINTR)
|
if (IS_EAGAIN(error))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user