summaryrefslogtreecommitdiffstats
path: root/PICA_common.h
diff options
context:
space:
mode:
authorAnton <anton@picapica>2017-12-01 21:55:53 +0400
committerAnton <anton@picapica>2017-12-01 21:55:53 +0400
commitac041927bc0c82e33acaa9e15fd46ecca0b77172 (patch)
tree742f1bf43917e79dae43c78684a2a3d055214e76 /PICA_common.h
parent32e742ed040c5a70edb4cbfb947581f1e192d5a6 (diff)
parent9c0a5bf2bbd94539427ece7eb1cb8ea82c6c3dec (diff)
downloadpica-pica-ac041927bc0c82e33acaa9e15fd46ecca0b77172.tar.gz
pica-pica-ac041927bc0c82e33acaa9e15fd46ecca0b77172.zip
Merge branch 'direct_c2c_connections'
Diffstat (limited to 'PICA_common.h')
-rw-r--r--PICA_common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/PICA_common.h b/PICA_common.h
index 49d18f1..5c0882a 100644
--- a/PICA_common.h
+++ b/PICA_common.h
@@ -4,11 +4,11 @@
#ifdef WIN32
#define CLOSE closesocket
#define SHUTDOWN(s) shutdown(s,SD_BOTH)
-#define IOCTLSETNONBLOCKINGSOCKET(s, arg) ioctlsocket(s, FIONBIO, (unsigned long*)(arg))
+#define IOCTLSETNONBLOCKINGSOCKET(s, a) {unsigned long arg = (a); ioctlsocket(s, FIONBIO, (unsigned long*)&arg); }
#else
#define CLOSE close
#define SHUTDOWN(s) shutdown(s,SHUT_RDWR)
-#define IOCTLSETNONBLOCKINGSOCKET(s, arg) ioctl(s, FIONBIO, (int*)(arg))
+#define IOCTLSETNONBLOCKINGSOCKET(s, a) {int arg = (a); ioctl(s, FIONBIO, (int*)&arg); }
#endif
#if defined(WIN32) || defined (__APPLE__)