UltraMonkey-L7 V3(multi-thread implementation)
Revisão | 8891521c7c454c1e99d45577f70fd6e199feffd2 (tree) |
---|---|
Hora | 2014-06-20 17:34:47 |
Autor | Hiroaki Nakano <nakano.hiroaki@nttc...> |
Commiter | Hiroaki Nakano |
#32547 fedora, RHEL7コンパイルエラー対処
fedora19で出たエラーの対処。
TIME_UTC以外に、pthread.soがリンクできずにリンカがエラーにもなる。
現在、configure実行時にLIBS="-lpthread"をつけて暫定対処中。
Signed-off-by: Hiroaki Nakano <nakano.hiroaki@nttcom.co.jp>
@@ -1,9 +1,9 @@ | ||
1 | 1 | AC_PREREQ(2.59) |
2 | -AC_INIT(l7vsd) | |
2 | +AC_INIT(l7vsd, 3.1.1, ultramonkey-l7-develop@lists.sourceforge.jp) | |
3 | 3 | PACKAGENAME=l7vsd |
4 | 4 | VERSION=3.1.1 |
5 | 5 | |
6 | -AM_INIT_AUTOMAKE($PACKAGENAME, $VERSION, no-define ) | |
6 | +AM_INIT_AUTOMAKE | |
7 | 7 | AC_CONFIG_SRCDIR([config.h.in]) |
8 | 8 | AC_CONFIG_HEADER([config.h]) |
9 | 9 |
@@ -173,6 +173,7 @@ l7vsd_LDADD = \ | ||
173 | 173 | -lboost_system-mt \ |
174 | 174 | -lboost_serialization-mt \ |
175 | 175 | -lnetsnmpmibs -lnetsnmpagent -lnetsnmphelpers -lnetsnmp \ |
176 | + -lpthread \ | |
176 | 177 | @external_agent_libs@ |
177 | 178 | |
178 | 179 | l7vsadm_CPPFLAGS = \ |
@@ -197,6 +198,7 @@ l7vsadm_LDADD = \ | ||
197 | 198 | libl7vsadm_parameter.a \ |
198 | 199 | -llog4cxx \ |
199 | 200 | -lrt \ |
201 | + -lpthread \ | |
200 | 202 | -lboost_thread-mt \ |
201 | 203 | -lboost_system-mt \ |
202 | 204 | -lboost_serialization-mt \ |
@@ -840,7 +840,11 @@ void tcp_session::up_thread_run() | ||
840 | 840 | } |
841 | 841 | if (!server_connected_flag && server_connect_time_out != 0) { |
842 | 842 | boost::xtime now_time; |
843 | +#if BOOST_VERSION >= 105000 | |
844 | + boost::xtime_get(&now_time, boost::TIME_UTC_); | |
845 | +#else | |
843 | 846 | boost::xtime_get(&now_time, boost::TIME_UTC); |
847 | +#endif | |
844 | 848 | if ((now_time.sec - client_connected_time.sec) > server_connect_time_out) { // timeout detect. |
845 | 849 | boost::system::error_code error_code; |
846 | 850 | client_socket.close(error_code); |
@@ -1139,7 +1143,11 @@ void tcp_session::up_thread_client_accept(const TCP_PROCESS_TYPE_TAG process_typ | ||
1139 | 1143 | this, |
1140 | 1144 | boost::asio::placeholders::error)); |
1141 | 1145 | } else { |
1142 | - boost::xtime_get(&client_connected_time, boost::TIME_UTC); | |
1146 | +#if BOOST_VERSION >= 105000 | |
1147 | + boost::xtime_get(&start_handshake_time, boost::TIME_UTC_); | |
1148 | +#else | |
1149 | + boost::xtime_get(&start_handshake_time, boost::TIME_UTC); | |
1150 | +#endif | |
1143 | 1151 | upthread_status = UPTHREAD_ACTIVE; |
1144 | 1152 | } |
1145 | 1153 | up_thread_next_call_function = up_thread_function_array[func_tag]; |