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

This commit is contained in:
Hennadii Stepanov 2024-10-30 07:33:51 +00:00
parent b619bdc330
commit ffda355b5a
No known key found for this signature in database
GPG key ID: 410108112E7EA81F
3 changed files with 3 additions and 6 deletions

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

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)

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>