From 837de123b2627f9fe305bdce63e70d7e740cf465 Mon Sep 17 00:00:00 2001 From: wangyu Date: Wed, 16 Aug 2017 19:44:19 +0800 Subject: [PATCH] added android target to makefile,fixed some log --- common.cpp | 6 ++++-- common.h | 3 +-- encrypt.cpp | 2 +- main.cpp | 6 ++++-- makefile | 14 ++++++++++---- 5 files changed, 20 insertions(+), 11 deletions(-) diff --git a/common.cpp b/common.cpp index d6ec31e..6e030fd 100644 --- a/common.cpp +++ b/common.cpp @@ -62,6 +62,7 @@ int add_iptables_rule(char * s) else { mylog(log_fatal,"auto added iptables failed by: %s\n",buf); + mylog(log_fatal,"reason : %s\n",strerror(errno)); myexit(-1); } return 0; @@ -80,6 +81,7 @@ int clear_iptables_rule() else { mylog(log_error,"clear iptables failed by: %s\n",buf); + mylog(log_error,"reason : %s\n",strerror(errno)); } } @@ -135,7 +137,7 @@ u64_t ntoh64(u64_t a) { if(__BYTE_ORDER == __LITTLE_ENDIAN) { - return __bswap_64( a); + return bswap_64( a); } else return a; @@ -144,7 +146,7 @@ u64_t hton64(u64_t a) { if(__BYTE_ORDER == __LITTLE_ENDIAN) { - return __bswap_64( a); + return bswap_64( a); } else return a; diff --git a/common.h b/common.h index 0436cf9..fcd1f93 100644 --- a/common.h +++ b/common.h @@ -43,8 +43,7 @@ #include #include #include - - +#include #include diff --git a/encrypt.cpp b/encrypt.cpp index b2e0af7..517a057 100755 --- a/encrypt.cpp +++ b/encrypt.cpp @@ -216,7 +216,7 @@ int auth_crc32_verify(const char *data,int &len) { if(len