Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
fix a bug and change how check is found (twitter#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yao Yue authored Sep 12, 2019
1 parent 54067ef commit 4e99e63
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
20 changes: 9 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,16 @@ endif(COVERAGE)
# test dependencies
include(FindPackageHandleStandardArgs)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")

find_package(PkgConfig QUIET)

if(PKG_CONFIG_FOUND)
pkg_check_modules(CHECK QUIET check>=0.10)
endif()

find_package(Check)
if(NOT CHECK_FOUND)
find_package(Check QUIET 0.10)
endif()
message(WARNING "Check is required to build and run tests")
endif(NOT CHECK_FOUND)
if(CHECK_FOUND)
check_symbol_exists(ck_assert_int_eq check.h CHECK_WORKING)
if(NOT CHECK_WORKING)
message(WARNING "Check version too old to build tests")
endif(NOT CHECK_WORKING)
endif(CHECK_FOUND)

if (HAVE_ITT_INSTRUMENTATION)
if(PKG_CONFIG_FOUND)
Expand Down Expand Up @@ -195,15 +195,13 @@ if(CHECK_FOUND)
add_subdirectory(test)
endif(CHECK_FOUND)


if(HAVE_RUST)
enable_language(Rust)
include(CMakeCargo)
add_subdirectory(rust)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_RUST=1")
endif()


###################
# print a summary #
###################
Expand Down
2 changes: 1 addition & 1 deletion src/channel/cc_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ tcp_reject_all(struct tcp_conn *sc)
log_error("accept on sd %d failed: %s", sc->sd, strerror(errno));
INCR(tcp_metrics, tcp_reject_ex);

return -1;
return;
}

ret = close(sd);
Expand Down

0 comments on commit 4e99e63

Please sign in to comment.