Browse Source

port to cygwin

U-DESKTOP-T772REH\wangyu 7 years ago
parent
commit
2051e47399
3 changed files with 7 additions and 3 deletions
  1. 1 1
      common.h
  2. 1 1
      log.h
  3. 5 1
      makefile

+ 1 - 1
common.h

@@ -26,7 +26,7 @@
 #include <netinet/tcp.h>   //Provides declarations for tcp header
 #include <netinet/udp.h>
 #include <netinet/ip.h>    //Provides declarations for ip header
-#include <netinet/if_ether.h>
+//#include <netinet/if_ether.h>
 #include <arpa/inet.h>
 #include <fcntl.h>
 #include <arpa/inet.h>

+ 1 - 1
log.h

@@ -28,7 +28,7 @@
 #include <netinet/tcp.h>   //Provides declarations for tcp header
 #include <netinet/udp.h>
 #include <netinet/ip.h>    //Provides declarations for ip header
-#include <netinet/if_ether.h>
+//#include <netinet/if_ether.h>
 #include <arpa/inet.h>
 #include <fcntl.h>
 #include <sys/socket.h>

+ 5 - 1
makefile

@@ -17,7 +17,11 @@ TAR=${NAME}_binaries.tar.gz `echo ${TARGETS}|sed -r 's/([^ ]+)/speederv2_\1/g'`
 
 all:git_version
 	rm -f ${NAME}
-	${cc_local}   -o ${NAME}          -I. ${SOURCES} ${FLAGS} -lrt -ggdb -static -O3
+	${cc_local}   -o ${NAME}          -I. ${SOURCES} ${FLAGS} -lrt -ggdb -static -O3 
+
+cygwin:git_version
+	rm -f ${NAME}
+	${cc_local}   -o ${NAME}          -I. ${SOURCES} ${FLAGS} -lrt -ggdb -static -O3 -D_GNU_SOURCE
 
 mac:git_version
 	rm -f ${NAME}