Преглед на файлове

should be a workaround for #212

Stasik0 преди 10 години
родител
ревизия
15802f5ec5
променени са 1 файла, в които са добавени 2 реда и са изтрити 9 реда
  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)