]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/gsocket.cpp
fix unicode build errors with 10.3
[wxWidgets.git] / src / unix / gsocket.cpp
index 9713fde61e57af85da5d29582c2f010e4aebffff..a1ceb862e3dee93d68f70917626f9647ed923ddb 100644 (file)
@@ -87,6 +87,10 @@ int _System bsdselect(int,
 int _System soclose(int);
 #  endif
 #endif
+#ifdef __EMX__
+#include <sys/select.h>
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
@@ -113,6 +117,12 @@ int _System soclose(int);
 #  endif
 #endif
 
+#else 
+   /* undefine for OSX - its really an int */
+#  ifdef __DARWIN__
+#    undef SOCKLEN_T
+#    define SOCKLEN_T int
+#  endif
 #endif /* SOCKLEN_T */
 
 /*
@@ -913,7 +923,7 @@ GSocketEventFlags GSocket::Select(GSocketEventFlags flags)
 
     /* Do not use a static struct, Linux can garble it */
     tv.tv_sec = m_timeout / 1000;
-    tv.tv_usec = (m_timeout % 1000) / 1000;
+    tv.tv_usec = (m_timeout % 1000) * 1000;
 
     FD_ZERO(&readfds);
     FD_ZERO(&writefds);