From 6f296b296842c98b590c1686fb254ef1accf19b5 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Thu, 4 Jul 2024 15:01:30 -0400 Subject: Optionally include strlcat --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 27230b8..aa4eb23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,12 @@ if (CMAKE_C_COMPILER_ID STREQUAL "Clang") add_compile_options(-Wall -Wextra -ansi) endif() +include(CheckFunctionExists) +check_function_exists(strlcat HAVE_STRLCAT) +if(NOT HAVE_STRLCAT) + add_definitions(-DHAVE_STRLCAT=1) +endif() + set(SRC_FILES src/linebuffer.c src/word.c -- cgit v1.2.3