From 7e6cb5c7e6c50c56985fb67b64b6f02a7bc26671 Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Fri, 15 Jun 2018 05:45:08 +0000 Subject: [PATCH] fix compile error on freebsd --- common.cpp | 4 ++-- common.h | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common.cpp b/common.cpp index deabdcf..cb0f8ee 100644 --- a/common.cpp +++ b/common.cpp @@ -417,7 +417,7 @@ void signal_handler(int sig) about_to_exit=1; // myexit(0); } - +/* int numbers_to_char(id_t id1,id_t id2,id_t id3,char * &data,int &len) { static char buf[buf_len]; @@ -444,7 +444,7 @@ int char_to_numbers(const char * data,int len,id_t &id1,id_t &id2,id_t &id3) id3=ntohl( *((id_t*)(data+sizeof(id_t)*2)) ); return 0; } - +*/ bool larger_than_u32(u32_t a,u32_t b) { diff --git a/common.h b/common.h index 7e1e788..83b9b1c 100644 --- a/common.h +++ b/common.h @@ -23,9 +23,9 @@ #include #include //for exit(0); #include //For errno - the error number -#include //Provides declarations for tcp header -#include -#include //Provides declarations for ip header +//#include //Provides declarations for tcp header +//#include +//#include //Provides declarations for ip header //#include #include #include @@ -33,7 +33,7 @@ #include #include #include -#include +//#include #include #include #include @@ -127,7 +127,7 @@ extern working_mode_t working_mode; extern int socket_buf_size; -typedef u32_t id_t; +//typedef u32_t id_t; typedef u64_t iv_t; @@ -223,8 +223,8 @@ unsigned short csum(const unsigned short *ptr,int nbytes); unsigned short tcp_csum(const pseudo_header & ph,const unsigned short *ptr,int nbytes); void signal_handler(int sig); -int numbers_to_char(id_t id1,id_t id2,id_t id3,char * &data,int &len); -int char_to_numbers(const char * data,int len,id_t &id1,id_t &id2,id_t &id3); +//int numbers_to_char(id_t id1,id_t id2,id_t id3,char * &data,int &len); +//int char_to_numbers(const char * data,int len,id_t &id1,id_t &id2,id_t &id3); void myexit(int a);