]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Fix compilation on OS X Yosemite 1293/head
authorVictor Julien <victor@inliniac.net>
Wed, 14 Jan 2015 08:48:39 +0000 (09:48 +0100)
committerVictor Julien <victor@inliniac.net>
Wed, 14 Jan 2015 10:45:22 +0000 (11:45 +0100)
Due to our unconditional declaration of the strlcat and strlcpy
functions, compilation failed on OS X Yosemite.

Bug #1192

configure.ac
src/suricata-common.h

index 48fcad47c38b5426a202e76b88f1ec8f2807dd71..fb4dfefe70982c828920759668725a7ab2408048 100644 (file)
     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
index 43c76c19f7c597d7015ede71993b79af2061ceb2..9aafa7aa35839d77c3ac55e68fbd6488b7f62335 100644 (file)
@@ -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;