[Forensics-changes] [yara] 184/407: Check for memmem function during configuration

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:28:24 UTC 2017


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag v3.3.0
in repository yara.

commit 88088c0504a4a5e1fadc59d899104ab78c085982
Author: Victor M. Alvarez <plusvic at gmail.com>
Date:   Mon Nov 3 09:58:10 2014 +0100

    Check for memmem function during configuration
---
 configure.ac                    | 2 +-
 libyara/include/yara/strutils.h | 2 +-
 libyara/strutils.c              | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index a4307f6..0de36a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,7 +80,7 @@ ACX_PTHREAD(
      CC="$PTHREAD_CC"],
     [AC_MSG_ERROR([pthread API support is required.])])
 
-AC_CHECK_FUNCS_ONCE(strlcpy strlcat)
+AC_CHECK_FUNCS_ONCE(strlcpy strlcat memmem)
 
 AM_CONDITIONAL([CUCKOO], [test x$build_cuckoo_module = xtrue])
 AM_CONDITIONAL([MAGIC], [test x$build_magic_module = xtrue])
diff --git a/libyara/include/yara/strutils.h b/libyara/include/yara/strutils.h
index 93463c0..8e688b4 100644
--- a/libyara/include/yara/strutils.h
+++ b/libyara/include/yara/strutils.h
@@ -50,7 +50,7 @@ size_t strlcat(
 #endif
 
 
-#ifdef _MSC_VER
+#if !HAVE_MEMMEM
 void* memmem(
     const void *haystack,
     size_t haystack_size,
diff --git a/libyara/strutils.c b/libyara/strutils.c
index ff082b2..e0b2df9 100644
--- a/libyara/strutils.c
+++ b/libyara/strutils.c
@@ -212,7 +212,7 @@ size_t strlcpy_w(
 }
 
 
-#ifdef _MSC_VER
+#if !HAVE_MEMMEM
 void* memmem(
     const void *haystack,
     size_t haystack_size,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git



More information about the forensics-changes mailing list