Skip to content

Commit

Permalink
[build] fix issue when executing build-commissioner-libs.sh multipl…
Browse files Browse the repository at this point in the history
…e 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
  • Loading branch information
ZhangLe2016 authored Apr 2, 2024
1 parent c7c1934 commit cf6b6c0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions third_party/libevent/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cf6b6c0

Please sign in to comment.