From 055b92556cb27f3d4127326f4c032068e30dffc2 Mon Sep 17 00:00:00 2001 From: brarcher Date: Wed, 25 Dec 2013 03:04:51 +0000 Subject: [PATCH] cmake: use libcompat's snprintf if not available on system git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@960 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- lib/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 750cb63..7d99513 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -64,6 +64,10 @@ if(NOT HAVE_DECL_SLEEP) set(SOURCES ${SOURCES} sleep.c) endif(NOT HAVE_DECL_SLEEP) +if(NOT HAVE_SNPRINTF AND NOT HAVE__SNPRINTF) + set(SOURCES ${SOURCES} snprintf.c) +endif(NOT HAVE_SNPRINTF AND NOT HAVE__SNPRINTF) + if(NOT HAVE_DECL_STRDUP AND NOT HAVE__STRDUP) set(SOURCES ${SOURCES} strdup.c) endif(NOT HAVE_DECL_STRDUP AND NOT HAVE__STRDUP) -- 2.40.0