Skip to content

Commit ffda355

Browse files
committed
cmake, refactor: Move HAVE_EVHTTP_... to libevent interface
1 parent b619bdc commit ffda355

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

cmake/bitcoin-build-config.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@
7171
*/
7272
#cmakedefine01 HAVE_DECL_SETSID
7373

74-
/* Define this symbol if evhttp_connection_get_peer expects const char** */
75-
#cmakedefine HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR 1
76-
7774
/* Define to 1 if fdatasync is available. */
7875
#cmakedefine HAVE_FDATASYNC 1
7976

cmake/module/FindLibevent.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ function(check_evhttp_connection_get_peer target)
3535
" HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR
3636
)
3737
cmake_pop_check_state()
38-
set(HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR ${HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR} PARENT_SCOPE)
38+
target_compile_definitions(${target} INTERFACE
39+
$<$<BOOL:${HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR}>:HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR>
40+
)
3941
endfunction()
4042

4143
set(_libevent_components core extra)

src/httpserver.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#include <bitcoin-build-config.h> // IWYU pragma: keep
6-
75
#include <httpserver.h>
86

97
#include <chainparamsbase.h>

0 commit comments

Comments
 (0)