From 869cb09bd34ca3549868b4f86cc6a6dfb2c551d4 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sun, 20 Sep 2015 01:54:27 +0200 Subject: [PATCH] [MinGW] bypass a broken detection: we do have asprintf here --- tools/cmake/CompleteInFiles.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/cmake/CompleteInFiles.cmake b/tools/cmake/CompleteInFiles.cmake index d4730daa72..8aed337eca 100644 --- a/tools/cmake/CompleteInFiles.cmake +++ b/tools/cmake/CompleteInFiles.cmake @@ -202,6 +202,14 @@ CHECK_SYMBOL_EXISTS(vsnprintf stdio.h HAVE_VSNPRINTF) CHECK_SYMBOL_EXISTS(asprintf stdio.h HAVE_ASPRINTF) CHECK_SYMBOL_EXISTS(vasprintf stdio.h HAVE_VASPRINTF) +if(MINGW) + # The detection of asprintf fails on MinGW, assumingly because it's + # defined as an inline function in stdio.h instead of a regular + # function. So force the result to be 1 despite of the test. + set(HAVE_ASPRINTF 1) + set(HAVE_VASPRINTF 1) +endif() + CHECK_FUNCTION_EXISTS(makecontext HAVE_MAKECONTEXT) CHECK_FUNCTION_EXISTS(mmap HAVE_MMAP) CHECK_FUNCTION_EXISTS(process_vm_readv HAVE_PROCESS_VM_READV) -- 2.20.1