diff options
Diffstat (limited to 'common/compat.h')
-rw-r--r-- | common/compat.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/common/compat.h b/common/compat.h index 7435e07..9127f95 100644 --- a/common/compat.h +++ b/common/compat.h @@ -103,6 +103,8 @@ char * strdup_path_mangle (const char *template); #define WIN32_LEAN_AND_MEAN 1 #include <windows.h> +#include <io.h> + /* Oh ... my ... god */ #undef CreateMutex @@ -135,13 +137,13 @@ typedef HMODULE dl_module_t; #define p11_dl_open(f) \ (LoadLibrary (f)) -#define p11_dl_close(d) \ - (FreeLibrary (d)) #define p11_dl_symbol(d, s) \ ((void *)GetProcAddress ((d), (s))) char * p11_dl_error (void); +void p11_dl_close (void * dl); + #define p11_sleep_ms(ms) \ (Sleep (ms)) @@ -164,6 +166,7 @@ void p11_mmap_close (p11_mmap *map); #include <pthread.h> #include <dlfcn.h> #include <time.h> +#include <unistd.h> typedef pthread_mutex_t p11_mutex_t; |