diff options
Diffstat (limited to 'compat/win32/lazyload.h')
-rw-r--r-- | compat/win32/lazyload.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compat/win32/lazyload.h b/compat/win32/lazyload.h index d2056cdadf..121ee24ed2 100644 --- a/compat/win32/lazyload.h +++ b/compat/win32/lazyload.h @@ -26,7 +26,8 @@ struct proc_addr { #define DECLARE_PROC_ADDR(dll, rettype, function, ...) \ static struct proc_addr proc_addr_##function = \ { #dll, #function, NULL, 0 }; \ - static rettype (WINAPI *function)(__VA_ARGS__) + typedef rettype (WINAPI *proc_type_##function)(__VA_ARGS__); \ + static proc_type_##function function /* * Loads a function from a DLL (once-only). @@ -35,7 +36,7 @@ struct proc_addr { * This function is not thread-safe. */ #define INIT_PROC_ADDR(function) \ - (function = get_proc_addr(&proc_addr_##function)) + (function = (proc_type_##function)get_proc_addr(&proc_addr_##function)) static inline FARPROC get_proc_addr(struct proc_addr *proc) { |