From fdc9cfaa148840c0c76d3837e359eeca5b33e3ad Mon Sep 17 00:00:00 2001 From: Luca Niccoli Date: Sun, 30 Apr 2023 13:02:31 +0200 Subject: cmake: Fix va_copy detection va_copy is defined by the standard as a macro, so check_function_exists will not detect it; check_symbol_exists will. Fixes #528. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 86b2b0aa..834b35d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,8 +169,8 @@ if (NOT MSVC) check_include_files(sys/timeb.h HAVE_SYS_TIMEB_H) check_include_files(sys/time.h HAVE_SYS_TIME_H) check_include_files(unistd.h HAVE_UNISTD_H) - check_function_exists(va_copy HAVE_VA_COPY) - check_function_exists(__va_copy HAVE___VA_COPY) + check_symbol_exists(va_copy stdarg.h HAVE_VA_COPY) + check_symbol_exists(__va_copy stdarg.h HAVE___VA_COPY) set(LT_OBJDIR ".libs/") check_c_source_compiles(" #include -- cgit v1.2.1