Skip to content

Commit

Permalink
pnet: Fix a compiler warning on Octave for Windows.
Browse files Browse the repository at this point in the history
Caused by using a POSIX/Unix MinGW build system for Octave
on Windows, where EWOULDBLOCK is a defined - but pointless for our purpose here - error code, so redefining
it to something meaningful without first undefining it
caused a compiler warning.
  • Loading branch information
kleinerm committed Nov 4, 2024
1 parent caf8e6e commit b7769c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Psychtoolbox/PsychHardware/iViewXToolbox/tcp_udp_ip/pnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
#define close(s) closesocket(s)
#define nonblockingsocket(s) {unsigned long ctl = 1;ioctlsocket( s, FIONBIO, &ctl );}
#define s_errno WSAGetLastError()
#ifdef EWOULDBLOCK /* MK: Undefine if defined, to avoid compiler warning on Octave + Windows MinGW compile */
#undef EWOULDBLOCK
#endif
#define EWOULDBLOCK WSAEWOULDBLOCK
#define usleep(a) Sleep((a)/1000)
#define MSG_NOSIGNAL 0
Expand Down

0 comments on commit b7769c2

Please sign in to comment.