From 43fb7f707f4db6d74ac3e4cab1b84411b98420cb Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 6 May 2014 23:42:11 +0900 Subject: [PATCH] Fix unittest build error --- src/Makefile.am | 3 ++- src/nghttp2_gzip_test.h | 8 ++++++++ src/shrpx-unittest.cc | 1 + tests/Makefile.am | 3 +-- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 759a5721..bd62a6fd 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -128,7 +128,8 @@ nghttpx_unittest_SOURCES = shrpx-unittest.cc \ shrpx_config_test.cc shrpx_config_test.h \ http2_test.cc http2_test.h \ util_test.cc util_test.h \ - nghttp2_gzip_test.c nghttp2_gzip_test.h + nghttp2_gzip_test.c nghttp2_gzip_test.h \ + nghttp2_gzip.c nghttp2_gzip.h nghttpx_unittest_CPPFLAGS = ${AM_CPPFLAGS}\ -DNGHTTP2_TESTS_DIR=\"$(top_srcdir)/tests\" nghttpx_unittest_LDFLAGS = -static diff --git a/src/nghttp2_gzip_test.h b/src/nghttp2_gzip_test.h index e8e38c7f..cf76861d 100644 --- a/src/nghttp2_gzip_test.h +++ b/src/nghttp2_gzip_test.h @@ -25,6 +25,14 @@ #ifndef NGHTTP2_GZIP_TEST_H #define NGHTTP2_GZIP_TEST_H +#ifdef __cplusplus +extern "C" { +#endif + void test_nghttp2_gzip_inflate(void); +#ifdef __cplusplus +} +#endif + #endif /* NGHTTP2_GZIP_TEST_H */ diff --git a/src/shrpx-unittest.cc b/src/shrpx-unittest.cc index fc9eb50e..e6e14968 100644 --- a/src/shrpx-unittest.cc +++ b/src/shrpx-unittest.cc @@ -33,6 +33,7 @@ #include "shrpx_config_test.h" #include "http2_test.h" #include "util_test.h" +#include "nghttp2_gzip_test.h" static int init_suite1(void) { diff --git a/tests/Makefile.am b/tests/Makefile.am index 77c02a1e..96881046 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -37,14 +37,13 @@ OBJECTS = main.c nghttp2_pq_test.c nghttp2_map_test.c nghttp2_queue_test.c \ nghttp2_session_test.c \ nghttp2_hd_test.c \ nghttp2_npn_test.c \ - nghttp2_gzip_test.c \ nghttp2_helper_test.c \ nghttp2_buf_test.c HFILES = nghttp2_pq_test.h nghttp2_map_test.h nghttp2_queue_test.h \ nghttp2_session_test.h \ nghttp2_frame_test.h nghttp2_stream_test.h nghttp2_hd_test.h \ - nghttp2_npn_test.h nghttp2_gzip_test.h nghttp2_helper_test.h \ + nghttp2_npn_test.h nghttp2_helper_test.h \ nghttp2_test_helper.h \ nghttp2_buf_test.h