mapi: Avoid Data Execution Prevention on windows.
This commit is contained in:
parent
80c8c891c9
commit
5569faf05a
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
|
||||
# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
|
||||
# if (defined(__GNUC__) && !defined(__MINGW32__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
|
||||
# define HIDDEN __attribute__((visibility("hidden")))
|
||||
# else
|
||||
# define HIDDEN
|
||||
|
|
|
@ -110,6 +110,22 @@ bail:
|
|||
}
|
||||
|
||||
|
||||
#elif defined(_WIN32)
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
/*
|
||||
* Avoid Data Execution Prevention.
|
||||
*/
|
||||
|
||||
void *
|
||||
u_execmem_alloc(unsigned int size)
|
||||
{
|
||||
return VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
void *
|
||||
|
|
Loading…
Reference in New Issue