From cf6b6c0888da25b3cc165cbf44f4acac56d09b6e Mon Sep 17 00:00:00 2001 From: ZhangLe2016 <156590889+ZhangLe2016@users.noreply.github.com> Date: Wed, 3 Apr 2024 01:14:02 +0800 Subject: [PATCH] [build] fix issue when executing `build-commissioner-libs.sh` multiple times (#250) When developers run the `build-commissioner-libs.sh` script multiple times, they might see the following error during compiling the libevent: error: call to undeclared function 'pipe2'; ISO C99 and later do not support implicit function declarations ... In fact, we did not use pip2 in libevent. We can turn it off by using the macro EVENT_HAVE-PIPE2=0 --- third_party/libevent/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/third_party/libevent/CMakeLists.txt b/third_party/libevent/CMakeLists.txt index 60e9d68d2..1fe43fc0e 100644 --- a/third_party/libevent/CMakeLists.txt +++ b/third_party/libevent/CMakeLists.txt @@ -36,6 +36,7 @@ set(EVENT__DISABLE_SAMPLES ON CACHE BOOL "libevent disable samples" FORCE) set(EVENT__DISABLE_REGRESS ON CACHE BOOL "libevent disable regression tests" FORCE) set(EVENT__DISABLE_TESTS ON CACHE BOOL "libevent disable tests" FORCE) set(EVENT__DISABLE_BENCHMARK ON CACHE BOOL "libevent disable benchmark" FORCE) +set(EVENT__HAVE_PIPE2 OFF CACHE BOOL "disable use of pipe2 in libevent" FORCE) add_subdirectory(repo) target_include_directories(event_core