Stasik0 10 vuotta sitten
vanhempi
commit
e485204f82
1 muutettua tiedostoa jossa 2 lisäystä ja 3 poistoa
  1. 2 3
      examples/networklayer_tcp.c

+ 2 - 3
examples/networklayer_tcp.c

@@ -2,7 +2,8 @@
  * This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
  */
  */
-
+#define _XOPEN_SOURCE 500 //some users need this for some reason
+#define __USE_BSD
 #include <stdlib.h> // malloc, free
 #include <stdlib.h> // malloc, free
 #ifdef _WIN32
 #ifdef _WIN32
 #include <malloc.h>
 #include <malloc.h>
@@ -12,8 +13,6 @@
 #include <ws2tcpip.h>
 #include <ws2tcpip.h>
 #define CLOSESOCKET(S) closesocket(S)
 #define CLOSESOCKET(S) closesocket(S)
 #else
 #else
-#define _XOPEN_SOURCE 500 //some users need this for some reason
-#define __USE_BSD
 #include <sys/select.h> 
 #include <sys/select.h> 
 #include <netinet/in.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>
 #include <netinet/tcp.h>