Parcourir la source

should be a workaround for #212

Stasik0 il y a 10 ans
Parent
commit
15802f5ec5
1 fichiers modifiés avec 2 ajouts et 9 suppressions
  1. 2 9
      examples/networklayer_tcp.c

+ 2 - 9
examples/networklayer_tcp.c

@@ -18,15 +18,8 @@
 #include <sys/socketvar.h>
 #include <sys/ioctl.h>
 #include <netdb.h> //gethostbyname for the client
-#ifndef _BSD_SOURCE
-	#define _BSD_SOURCE
-#endif
-#ifndef _DEFAULT_SOURCE
-	#define _DEFAULT_SOURCE
-#endif
-#ifndef __USE_BSD
-	#define __USE_BSD
-#endif
+#define _XOPEN_SOURCE 500 //some users need this for some reason
+#define __USE_BSD
 #include <unistd.h> // read, write, close
 #include <arpa/inet.h>
 #define CLOSESOCKET(S) close(S)