cmake, refactor: Move HAVE_EVHTTP_... to libevent interface

This commit is contained in:
Hennadii Stepanov committed 2024-11-06 15:40:42 +00:00
1 parent b619bdc330
commit ffda355b5a
3 files changed
+3 -6

No files matched your search

-3
View File
@@ -71,9 +71,6 @@
*/
#cmakedefine01 HAVE_DECL_SETSID
/* Define this symbol if evhttp_connection_get_peer expects const char** */
#cmakedefine HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR 1
/* Define to 1 if fdatasync is available. */
#cmakedefine HAVE_FDATASYNC 1
+3 -1
View File
@@ -35,7 +35,9 @@ function(check_evhttp_connection_get_peer target)
" HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR
)
cmake_pop_check_state()
set(HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR ${HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR} PARENT_SCOPE)
target_compile_definitions(${target} INTERFACE
$<$<BOOL:${HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR}>:HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR>
)
endfunction()
set(_libevent_components core extra)
-2
View File
@@ -2,8 +2,6 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <bitcoin-build-config.h> // IWYU pragma: keep
#include <httpserver.h>
#include <chainparamsbase.h>