summaryrefslogtreecommitdiff
path: root/src/plugin-luahttp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugin-luahttp.cc')
-rw-r--r--src/plugin-luahttp.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugin-luahttp.cc b/src/plugin-luahttp.cc
index ae7ee34..ef3a5f4 100644
--- a/src/plugin-luahttp.cc
+++ b/src/plugin-luahttp.cc
@@ -1,12 +1,18 @@
#include <LuaHttp.h>
+#ifndef WIN32
+#define WEAK __attribute__ ((weak))
+#else
+#define WEAK
+#endif
+
static void _init_plugin(Lua * L) {
LuaHttpResponse::pushstatics(L);
}
extern "C" {
-__attribute__ ((weak)) void init_plugin(Lua * L) {
+WEAK void init_plugin(Lua * L) {
_init_plugin(L);
}