diff options
author | Yaakov Selkowitz <[email protected]> | 2012-12-25 21:50:14 -0600 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-01-04 17:29:50 +0100 |
commit | 61d109a6e5794cf393d1f9d5bebda10f8efce902 (patch) | |
tree | 308bbb77ef752ad600020bb77a59d542d854f26b /src/daemon/engines.c | |
parent | 2f0f21bde5e00fc0abb3379ffb9f23574e9508ad (diff) | |
download | mate-notification-daemon-61d109a6e5794cf393d1f9d5bebda10f8efce902.tar.bz2 mate-notification-daemon-61d109a6e5794cf393d1f9d5bebda10f8efce902.tar.xz |
Fix engine loading portability
Use GModule APIs for determining engine filenames. Also, link with
the -no-undefined flag, required on PE platforms.
Diffstat (limited to 'src/daemon/engines.c')
-rw-r--r-- | src/daemon/engines.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/daemon/engines.c b/src/daemon/engines.c index 23a2ade..2217f28 100644 --- a/src/daemon/engines.c +++ b/src/daemon/engines.c @@ -56,12 +56,9 @@ static ThemeEngine* active_engine = NULL; static ThemeEngine* load_theme_engine(const char *name) { ThemeEngine* engine; - char* filename; char* path; - filename = g_strdup_printf("lib%s.so", name); - path = g_build_filename(ENGINES_DIR, filename, NULL); - g_free (filename); + path = g_module_build_path (ENGINES_DIR, name); engine = g_new0(ThemeEngine, 1); engine->ref_count = 1; @@ -113,7 +110,7 @@ static ThemeEngine* load_theme_engine(const char *name) if (engine->module != NULL && !g_module_close (engine->module)) { - g_warning("%s: %s", filename, g_module_error()); + g_warning("%s: %s", name, g_module_error()); } g_free(engine); |