From: Victor Julien Date: Wed, 14 Jan 2015 08:48:39 +0000 (+0100) Subject: Fix compilation on OS X Yosemite X-Git-Tag: suricata-2.1beta3~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1293%2Fhead;p=thirdparty%2Fsuricata.git 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 --- diff --git a/configure.ac b/configure.ac index 48fcad47c3..fb4dfefe70 100644 --- a/configure.ac +++ b/configure.ac @@ -164,6 +164,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;