summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-03-28 01:33:29 +0000
committerDavid Robillard <d@drobilla.net>2011-03-28 01:33:29 +0000
commit30504fa2ca426c3585affda6502ac1113dd408e3 (patch)
treee733d7cc29096a8b1c541bea216882abdd651d55
parentd7fb71a582f9159113be83493e1c0009f406003d (diff)
downloadsuil-30504fa2ca426c3585affda6502ac1113dd408e3.tar.gz
suil-30504fa2ca426c3585affda6502ac1113dd408e3.tar.bz2
suil-30504fa2ca426c3585affda6502ac1113dd408e3.zip
Fix Windows build.
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@3128 a436a847-0d15-0410-975c-d299462d15a1
-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"