Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Backport changes from PR29081 #150

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions cmake/bitcoin-config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@
/* Define this symbol if the Linux getrandom function call is available */
#cmakedefine HAVE_GETRANDOM 1

/* Define this symbol if gmtime_r is available */
#cmakedefine HAVE_GMTIME_R 1

/* Define this symbol if you have malloc_info */
#cmakedefine HAVE_MALLOC_INFO 1

Expand Down
26 changes: 0 additions & 26 deletions cmake/introspection.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,32 +52,6 @@ endif()
include(TestAppendRequiredLibraries)
test_append_atomic_library(core_interface)

# Check for gmtime_r(), fallback to gmtime_s() if that is unavailable.
# Fail if neither are available.
check_cxx_source_compiles("
#include <ctime>

int main()
{
gmtime_r((const time_t*)nullptr, (struct tm*)nullptr);
}
" HAVE_GMTIME_R
)
if(NOT HAVE_GMTIME_R)
check_cxx_source_compiles("
#include <ctime>

int main()
{
gmtime_s((struct tm*)nullptr, (const time_t*)nullptr);
}
" HAVE_GMTIME_S
)
if(NOT HAVE_GMTIME_S)
message(FATAL_ERROR "Both gmtime_r and gmtime_s are unavailable.")
endif()
endif()

check_cxx_symbol_exists(std::system "cstdlib" HAVE_STD_SYSTEM)
check_cxx_symbol_exists(::_wsystem "stdlib.h" HAVE__WSYSTEM)
if(HAVE_STD_SYSTEM OR HAVE__WSYSTEM)
Expand Down
Loading