From 707888c074e7b439bdfaf8fea5e9a80b67ee2c17 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 14 Jan 2015 09:48:39 +0100 Subject: [PATCH] Fix compilation on OS X Yosemite Due to our unconditional declaration of the strlcat and strlcpy functions, compilation failed on OS X Yosemite. Bug #1192 --- configure.ac | 1 + src/suricata-common.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index d36ecaa7b7..a50cbec7bd 100644 --- a/configure.ac +++ b/configure.ac @@ -163,6 +163,7 @@ AC_FUNC_MALLOC AC_FUNC_REALLOC AC_CHECK_FUNCS([gettimeofday memset strcasecmp strchr strdup strerror strncasecmp strtol strtoul memchr memrchr]) + AC_CHECK_FUNCS([strlcpy strlcat]) # Add large file support AC_SYS_LARGEFILE diff --git a/src/suricata-common.h b/src/suricata-common.h index 43c76c19f7..9aafa7aa35 100644 --- a/src/suricata-common.h +++ b/src/suricata-common.h @@ -323,8 +323,12 @@ typedef enum PacketProfileDetectId_ { #include "util-path.h" #include "util-conf.h" +#ifndef HAVE_STRLCAT size_t strlcat(char *, const char *src, size_t siz); +#endif +#ifndef HAVE_STRLCPY size_t strlcpy(char *dst, const char *src, size_t siz); +#endif extern int coverage_unittests; extern int g_ut_modules; -- 2.47.3