Signed-off-by: Alon Bar-Lev <[email protected]>
---
src/common/libscdl.c | 9 ++++++---
src/common/libscdl.h | 3 +++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/common/libscdl.c b/src/common/libscdl.c
index e4746ab..b66dbd5 100644
--- a/src/common/libscdl.c
+++ b/src/common/libscdl.c
@@ -18,11 +18,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include "libscdl.h"
#ifdef WIN32
+#include <windows.h>
void *sc_dlopen(const char *filename)
{
return (void *)LoadLibrary(filename);
@@ -30,7 +33,7 @@ void *sc_dlopen(const char *filename)
void *sc_dlsym(void *handle, const char *symbol)
{
- return GetProcAddress(handle, symbol);
+ return GetProcAddress((HANDLE)handle, symbol);
}
const char *sc_dlerror()
@@ -40,7 +43,7 @@ const char *sc_dlerror()
int sc_dlclose(void *handle)
{
- return FreeLibrary(handle);
+ return FreeLibrary((HANDLE)handle);
}
#else
#include <dlfcn.h>
diff --git a/src/common/libscdl.h b/src/common/libscdl.h
index aee5839..983683d 100644
--- a/src/common/libscdl.h
+++ b/src/common/libscdl.h
@@ -18,7 +18,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#ifndef __LIBSCDL_H
+#define __LIBSCDL_H
void *sc_dlopen(const char *filename);
void *sc_dlsym(void *handle, const char *symbol);
int sc_dlclose(void *handle);
const char *sc_dlerror(void);
+#endif
--
1.7.3.4
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel