summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common.h6
-rw-r--r--src/core/modules.c10
-rw-r--r--src/core/modules.h2
3 files changed, 15 insertions, 3 deletions
diff --git a/src/common.h b/src/common.h
index 7b8ddba2..e5b8d6c6 100644
--- a/src/common.h
+++ b/src/common.h
@@ -5,7 +5,7 @@
#define IRSSI_WEBSITE "http://irssi.org"
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "../config.h"
#endif
#include <stdio.h>
@@ -39,7 +39,9 @@
#endif
#include <glib.h>
-#include <gmodule.h>
+#ifdef HAVE_GMODULE
+# include <gmodule.h>
+#endif
#include "core/memdebug.h"
#include "nls.h"
diff --git a/src/core/modules.c b/src/core/modules.c
index 8696b973..614fbf0a 100644
--- a/src/core/modules.c
+++ b/src/core/modules.c
@@ -239,7 +239,8 @@ char *module_get_name(const char *path)
return module_name;
}
-GModule *module_open(const char *name)
+#ifdef HAVE_GMODULE
+static GModule *module_open(const char *name)
{
struct stat statbuf;
GModule *module;
@@ -310,9 +311,11 @@ static int module_load_name(const char *path, const char *name)
signal_emit("module loaded", 1, rec);
return TRUE;
}
+#endif
int module_load(const char *path)
{
+#ifdef HAVE_GMODULE
char *name;
int ret;
@@ -326,10 +329,14 @@ int module_load(const char *path)
g_free(name);
return ret;
+#else
+ return FALSE;
+#endif
}
void module_unload(MODULE_REC *module)
{
+#ifdef HAVE_GMODULE
void (*module_deinit) (void);
char *deinitfunc;
@@ -353,6 +360,7 @@ void module_unload(MODULE_REC *module)
g_module_close(module->gmodule);
g_free(module->name);
g_free(module);
+#endif
}
static void uniq_get_modules(char *key, void *value, GSList **list)
diff --git a/src/core/modules.h b/src/core/modules.h
index 61e4f319..12730c53 100644
--- a/src/core/modules.h
+++ b/src/core/modules.h
@@ -21,7 +21,9 @@ enum {
typedef struct {
char *name;
+#ifdef HAVE_GMODULE
GModule *gmodule;
+#endif
} MODULE_REC;
extern GSList *modules;