[Forensics-changes] [yara] 368/368: Gets pe_utils.c to compile with VS2015. (#488)
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:31:01 UTC 2017
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag v3.5.0
in repository yara.
commit 74734418a256c5304ccaf1d322c57e305ff75362
Author: Marc-Antoine Courteau <macourteau at users.noreply.github.com>
Date: Tue Aug 2 16:08:18 2016 -0400
Gets pe_utils.c to compile with VS2015. (#488)
* Visual Studio 2015 (_MSC_VER == 1900) defines the snprintf function, so avoid defining it in those cases.
* Adds missing include (for 'sprintf').
* Gets pe_utils.c to compile with VS2015.
---
libyara/modules/pe_utils.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/libyara/modules/pe_utils.c b/libyara/modules/pe_utils.c
index e12aebb..81a7ae4 100644
--- a/libyara/modules/pe_utils.c
+++ b/libyara/modules/pe_utils.c
@@ -1,11 +1,20 @@
-#if !HAVE_TIMEGM
-
-#include <time.h>
+#include <stdio.h>
+#include <yara/mem.h>
#include <yara/integers.h>
+#if defined(WIN32)
+#include <string.h>
+#define strncasecmp _strnicmp
+#define timegm _mkgmtime
+#endif
+
+#if !HAVE_TIMEGM && !defined(WIN32)
+
+#include <time.h>
+
static int is_leap(
unsigned int year)
{
--
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