From ac5c6f1e0d66bcd6a8d5010261abcfa8bf67c5b0 Mon Sep 17 00:00:00 2001 From: n-a-c-h Date: Thu, 29 May 2008 03:20:05 +0000 Subject: [PATCH] Fix for MSVC. --- src/win32/protect.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/win32/protect.h b/src/win32/protect.h index 0bd6cd13..52c00ceb 100644 --- a/src/win32/protect.h +++ b/src/win32/protect.h @@ -10,13 +10,13 @@ extern "C" { int ExecutableValid(const char *executable_filename); char *unprotect_buffer(unsigned char *buffer, size_t buffer_len); -#define SET_FN_PTR(func, num) \ - static inline void *get_##func(void) { \ - int i, j = num / 4; \ - long ptr = (long)func + num; \ - for (i = 0; i < 2; i++) ptr -= j; \ - return (void *)(ptr - (j * 2)); \ - } +#define SET_FN_PTR(func, num) \ + static __inline void *get_##func(void) { \ + int i, j = num / 4; \ + long ptr = (long)func + num; \ + for (i = 0; i < 2; i++) { ptr -= j; } \ + return (void *)(ptr - (j * 2)); \ + } #define GET_FN_PTR(func) get_##func()