Workaround function missing in libhtp include

As reported in bug #688, htp_config_set_path_decode_u_encoding
function is not included in libhtp header before 0.3.0. Result
is that suricata compilation fail with an external htp library.
The following patch detect the issue and adds the missing
declaration.
pull/291/head
Eric Leblond 13 years ago
parent d472d606e9
commit 6d225378e4

@ -1021,12 +1021,11 @@ AC_INIT(configure.ac)
exit 1
fi
AC_CHECK_LIB([htp], [htp_config_register_request_uri_normalize],AC_DEFINE_UNQUOTED([HAVE_HTP_URI_NORMALIZE_HOOK],[1],[Found htp_config_register_request_uri_normalize function in libhtp]) ,,[-lhtp])
# check for htp_tx_get_response_headers_raw
AC_CHECK_LIB([htp], [htp_tx_get_response_headers_raw],AC_DEFINE_UNQUOTED([HAVE_HTP_TX_GET_RESPONSE_HEADERS_RAW],[1],[Found htp_tx_get_response_headers_raw in libhtp]) ,,[-lhtp])
AC_CHECK_LIB([htp], [htp_decode_query_inplace],AC_DEFINE_UNQUOTED([HAVE_HTP_DECODE_QUERY_INPLACE],[1],[Found htp_decode_query_inplace function in libhtp]) ,,[-lhtp])
AC_EGREP_HEADER(htp_config_set_path_decode_u_encoding, htp/htp.h, AC_DEFINE_UNQUOTED([HAVE_HTP_SET_PATH_DECODE_U_ENCODING],[1],[Found usable htp_config_set_path_decode_u_encoding function in libhtp]) )
])
# even if we are using an installed htp lib we still need to gen Makefiles inside of htp

@ -72,6 +72,10 @@
#include "util-memcmp.h"
#ifndef HAVE_HTP_SET_PATH_DECODE_U_ENCODING
void htp_config_set_path_decode_u_encoding(htp_cfg_t *cfg, int decode_u_encoding);
#endif
//#define PRINT
/** Fast lookup tree (radix) for the various HTP configurations */

Loading…
Cancel
Save