aboutsummaryrefslogtreecommitdiffhomepage
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/config.c5
-rw-r--r--core/core.c3
-rw-r--r--core/plugin.c12
3 files changed, 13 insertions, 7 deletions
diff --git a/core/config.c b/core/config.c
index 705f690..b950b25 100644
--- a/core/config.c
+++ b/core/config.c
@@ -3,7 +3,10 @@
#include <unistd.h>
#include <errno.h>
#ifndef _WIN32
-#include <limits.h>
+ #include <limits.h>
+ #define MM_API __attribute__((visibility ("default")))
+#else
+ #define MM_API __attribute__((dllexport))
#endif
#define BACKEND_NAME "core/cfg"
diff --git a/core/core.c b/core/core.c
index f9874f7..804ec4e 100644
--- a/core/core.c
+++ b/core/core.c
@@ -7,6 +7,7 @@
#include <sys/select.h>
#define MM_API __attribute__((visibility ("default")))
#else
+ #include <fcntl.h>
#define MM_API __attribute__((dllexport))
#endif
@@ -223,7 +224,7 @@ int core_iteration(){
}
//run backend processing to collect events
- DBGPF("%" PRIsize_t " backend FDs signaled", nfds);
+ DBGPF("%" PRIsize_t " backend FDs signaled", n);
if(backends_handle(n, signaled_fds)){
return 1;
}
diff --git a/core/plugin.c b/core/plugin.c
index ec32760..cd85059 100644
--- a/core/plugin.c
+++ b/core/plugin.c
@@ -7,12 +7,14 @@
#include <dirent.h>
#include "portability.h"
#ifdef _WIN32
-#define dlclose FreeLibrary
-#define dlsym GetProcAddress
-#define dlerror() "Failed"
-#define dlopen(lib,ig) LoadLibrary(lib)
+ #define dlclose FreeLibrary
+ #define dlsym GetProcAddress
+ #define dlerror() "Failed"
+ #define dlopen(lib,ig) LoadLibrary(lib)
+ #define MM_API __attribute__((dllexport))
#else
-#include <dlfcn.h>
+ #include <dlfcn.h>
+ #define MM_API __attribute__((visibility ("default")))
#endif
#define BACKEND_NAME "core/pl"