summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertise.dev>2020-05-04 20:04:09 -0300
committerFelipe Magno de Almeida <felipe@expertise.dev>2020-05-04 22:11:45 -0300
commitdb2fe9bfcc86630966dc5fddbbba5f1e7a7d9160 (patch)
treeeb9c201136d6ec9d665edf6205cf6994d5e62a8e
parent253f8eaa77c43ab2136774c00fc8b477ebedcca1 (diff)
Fix EVIL_API for mmap functions
-rw-r--r--src/lib/evil/evil_api.h4
-rw-r--r--src/lib/evil/evil_mman.c4
-rw-r--r--src/lib/evil/evil_mman.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/evil/evil_api.h b/src/lib/evil/evil_api.h
index 673bb1d2d0..c56fa9b2b0 100644
--- a/src/lib/evil/evil_api.h
+++ b/src/lib/evil/evil_api.h
@@ -6,9 +6,7 @@
6#endif 6#endif
7 7
8#ifdef _MSC_VER 8#ifdef _MSC_VER
9# ifndef EVIL_DLL 9# ifdef EVIL_BUILD
10# define EVIL_API
11# elif defined(EVIL_BUILD)
12# define EVIL_API __declspec(dllexport) 10# define EVIL_API __declspec(dllexport)
13# else 11# else
14# define EVIL_API __declspec(dllimport) 12# define EVIL_API __declspec(dllimport)
diff --git a/src/lib/evil/evil_mman.c b/src/lib/evil/evil_mman.c
index f8d1ca58c3..18238acac0 100644
--- a/src/lib/evil/evil_mman.c
+++ b/src/lib/evil/evil_mman.c
@@ -2,7 +2,7 @@
2# include "config.h" 2# include "config.h"
3#endif /* HAVE_CONFIG_H */ 3#endif /* HAVE_CONFIG_H */
4 4
5#if 0 5#include <evil_api.h>
6 6
7#include <stdlib.h> 7#include <stdlib.h>
8#include <stdio.h> 8#include <stdio.h>
@@ -156,4 +156,4 @@ mprotect(void *addr, size_t len, int prot)
156 return VirtualProtect(addr, len, _evil_mmap_protection_get(prot), &old) ? 0 : -1; 156 return VirtualProtect(addr, len, _evil_mmap_protection_get(prot), &old) ? 0 : -1;
157} 157}
158 158
159#endif 159
diff --git a/src/lib/evil/evil_mman.h b/src/lib/evil/evil_mman.h
index 0e5452284f..ada247c8a3 100644
--- a/src/lib/evil/evil_mman.h
+++ b/src/lib/evil/evil_mman.h
@@ -1,6 +1,8 @@
1#ifndef __EVIL_SYS_MMAN_H__ 1#ifndef __EVIL_SYS_MMAN_H__
2#define __EVIL_SYS_MMAN_H__ 2#define __EVIL_SYS_MMAN_H__
3 3
4#include <evil_api.h>
5
4#include <sys/types.h> 6#include <sys/types.h>
5 7
6 8