summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/instance.c2
-rw-r--r--src/suil_internal.h8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/instance.c b/src/instance.c
index c0c2018..9ad952b 100644
--- a/src/instance.c
+++ b/src/instance.c
@@ -31,8 +31,6 @@
#include <stdlib.h>
#include <string.h>
-#include <dlfcn.h>
-
#include "suil-config.h"
#include "suil_internal.h"
diff --git a/src/suil_internal.h b/src/suil_internal.h
index ac532ab..0ddfb72 100644
--- a/src/suil_internal.h
+++ b/src/suil_internal.h
@@ -29,7 +29,15 @@
#include <assert.h>
#include <stdlib.h>
+#ifdef __WIN32__
+#include <windows.h>
+#define dlopen(path, flags) LoadLibrary(path)
+#define dlclose(lib) FreeLibrary(lib)
+#define dlsym GetProcAddress
+static inline char* dlerror(void) { return "Unknown error"; }
+#else
#include <dlfcn.h>
+#endif
#include "suil/suil.h"