summaryrefslogtreecommitdiff
path: root/src/plugin-luagl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugin-luagl.cc')
-rw-r--r--src/plugin-luagl.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugin-luagl.cc b/src/plugin-luagl.cc
index 34bdc2d..b319a85 100644
--- a/src/plugin-luagl.cc
+++ b/src/plugin-luagl.cc
@@ -1,5 +1,11 @@
#include <LuaGL.h>
+#ifndef WIN32
+#define WEAK __attribute__ ((weak))
+#else
+#define WEAK
+#endif
+
static void _init_plugin(Lua * L) {
luaopen_opengl(L);
L->pop();
@@ -7,7 +13,7 @@ static void _init_plugin(Lua * L) {
extern "C" {
-__attribute__ ((weak)) void init_plugin(Lua * L) {
+WEAK void init_plugin(Lua * L) {
_init_plugin(L);
}