Revision | f51f073d8f941830aeb377b25e572a30bf6ebc01 (tree) |
---|---|
Time | 2013-12-09 17:59:55 |
Author | Hiroaki Nakano <nakano.hiroaki@nttc...> |
Commiter | Hiroaki Nakano |
#32547: fedora, RHEL7コンパイルエラー対処
TIME_UTCの仕様変更対処、pthreadがリンクされず
リンカエラーとなることへの対処。
ついでに、autotoolsバージョンアップによる
AC_INITとAM_INIT_AUTOMAKEの仕様変更対処。
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.0, ultramonkey-l7-develop@lists.sourceforge.jp) | |
3 | 3 | PACKAGENAME=l7vsd |
4 | 4 | VERSION=3.1.0 |
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 |
@@ -27,6 +27,8 @@ AC_CHECK_LIB(boost_system-mt, main, :, | ||
27 | 27 | [AC_MSG_ERROR( l7vsd require boost library. )] ) |
28 | 28 | AC_CHECK_LIB([netsnmp], main, :, |
29 | 29 | [AC_MSG_ERROR( l7vsd require netsnmp library. )] ) |
30 | +AC_CHECK_LIB(pthread, main, :, | |
31 | + [AC_MSG_ERROR( l7vsd require pthread library. )] ) | |
30 | 32 | |
31 | 33 | # Checks for header files. |
32 | 34 | AC_CHECK_HEADERS([limits.h unistd.h]) |
@@ -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]; |