소스 검색

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)