Skip to content
This repository was archived by the owner on Mar 30, 2020. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS
add_library(tcpinfo_lib
${SRC_DIR}/tcpinfo_lib.cc ${SRC_DIR}/tcpinfo_lib.h
${SRC_DIR}/tcpinfo_c_adapter.h ${SRC_DIR}/tcpinfo_c_adapter.c
${PROTO_HDRS} ${PROTO_SRCS})
${SRC_DIR}/gtest_prod.h ${PROTO_HDRS} ${PROTO_SRCS})
add_dependencies(tcpinfo_lib iproute2)

target_link_libraries(tcpinfo_lib
Expand Down
3 changes: 2 additions & 1 deletion install-protobuf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

# check to see if protobuf tools already exist.
LIBS=`/usr/bin/pkg-config --libs protobuf`
if [ $? -ne 0 ] ; then
PB_VER=`protoc --version`
if [[ ($? -ne 0) || ("${PB_VER}" < "libprotoc 3.1.0") || (-z "${LIBS}")]]; then
if [ -r protobuf/configure ] ; then
echo "Using cached protobuf."
cd protobuf
Expand Down
9 changes: 9 additions & 0 deletions src/gtest_prod.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// This is just a local copy of googletest gtest_prod.h, to avoid
// the dependency on the gtest library for production only sources.

#ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_
#define GTEST_INCLUDE_GTEST_GTEST_PROD_H_
#define FRIEND_TEST(test_case_name, test_name)\
friend class test_case_name##_##test_name##_Test
#endif // GTEST_INCLUDE_GTEST_GTEST_PROD_H_

2 changes: 1 addition & 1 deletion src/tcpinfo_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include "connection_cache.h"
#include "tcpinfo.pb.h"
#include "gtest/gtest_prod.h"
#include "gtest_prod.h" // Using local copy instead of library include.

extern "C" {
#include <linux/inet_diag.h> // Should come from iproute2 submodule.
Expand Down