diff options
| author | Pali Rohár <pali.rohar@gmail.com> | 2020-08-04 18:35:01 +0200 |
|---|---|---|
| committer | Pali Rohár <pali.rohar@gmail.com> | 2020-08-04 18:35:01 +0200 |
| commit | e1d593d967ccb3f1efe8d60889e0d2c1f8b6d855 (patch) | |
| tree | d93545d2088e4f0222ce94d1391f30f7a9a4f019 | |
| parent | 0a494c01b0586faa5f89465c0728f0fb209c08df (diff) | |
| download | dlfcn-win32-e1d593d967ccb3f1efe8d60889e0d2c1f8b6d855.tar.gz dlfcn-win32-e1d593d967ccb3f1efe8d60889e0d2c1f8b6d855.tar.bz2 dlfcn-win32-e1d593d967ccb3f1efe8d60889e0d2c1f8b6d855.zip | |
Fix compilation with older environments
This change should fix following compile error:
dlfcn.c: In function 'dlsym':
dlfcn.c:374:14: warning: implicit declaration of function 'GetModuleHandleExA'
dlfcn.c: undefined reference to `GetModuleHandleExA'
Documentation for function GetModuleHandleExA() says:
To compile an application that uses this function, define _WIN32_WINNT as 0x0501 or later.
Fixes: https://github.com/dlfcn-win32/dlfcn-win32/issues/75
| -rw-r--r-- | dlfcn.c | 3 |
1 files changed, 3 insertions, 0 deletions
| @@ -19,6 +19,9 @@ | |||
| 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | #ifndef _WIN32_WINNT | ||
| 23 | #define _WIN32_WINNT 0x0501 | ||
| 24 | #endif | ||
| 22 | #ifdef _DEBUG | 25 | #ifdef _DEBUG |
| 23 | #define _CRTDBG_MAP_ALLOC | 26 | #define _CRTDBG_MAP_ALLOC |
| 24 | #include <stdlib.h> | 27 | #include <stdlib.h> |
