summaryrefslogtreecommitdiffstats
path: root/src/Common
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/ModuleManager.cpp9
-rw-r--r--src/Common/RequestHandlers/CMakeLists.txt2
-rw-r--r--src/Common/Requests/CMakeLists.txt2
3 files changed, 8 insertions, 5 deletions
diff --git a/src/Common/ModuleManager.cpp b/src/Common/ModuleManager.cpp
index 569f5aa..05a2b73 100644
--- a/src/Common/ModuleManager.cpp
+++ b/src/Common/ModuleManager.cpp
@@ -17,6 +17,9 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
+#include <config.h>
+
#include "ModuleManager.h"
#include "ConfigEntry.h"
@@ -73,7 +76,7 @@ lt_dlhandle ModuleManager::loadModule(const std::string &name) {
std::map<std::string, std::pair<lt_dlhandle, bool> >::iterator mod = modules.find(name);
if(mod == modules.end()) {
- lt_dlhandle handle = lt_dlopen((name + ".la").c_str());
+ lt_dlhandle handle = lt_dlopen((name + MODULE_SUFFIX).c_str());
if(!handle)
return 0;
@@ -81,7 +84,7 @@ lt_dlhandle ModuleManager::loadModule(const std::string &name) {
mod = modules.insert(std::make_pair(lt_dlgetinfo(handle)->name, std::make_pair(handle, false))).first;
}
if(!mod->second.second) {
- void (*initFun)() = (void(*)())lt_dlsym(mod->second.first, "init");
+ void (*initFun)() = (void(*)())lt_dlsym(mod->second.first, (name + "_init").c_str());
if(initFun)
(*initFun)();
@@ -95,7 +98,7 @@ lt_dlhandle ModuleManager::loadModule(const std::string &name) {
void ModuleManager::unloadModule(const std::string &name) {
void (*deinitFun)();
- deinitFun = (void(*)())lt_dlsym(modules[name].first, "deinit");
+ deinitFun = (void(*)())lt_dlsym(modules[name].first, (name + "_deinit").c_str());
if(deinitFun)
(*deinitFun)();
diff --git a/src/Common/RequestHandlers/CMakeLists.txt b/src/Common/RequestHandlers/CMakeLists.txt
index 49f9079..f774e14 100644
--- a/src/Common/RequestHandlers/CMakeLists.txt
+++ b/src/Common/RequestHandlers/CMakeLists.txt
@@ -1,6 +1,6 @@
include_directories(${INCLUDES})
-add_library(RequestHandlers
+add_library(RequestHandlers STATIC
DisconnectRequestHandler.cpp FSInfoRequestHandler.cpp StatusRequestHandler.cpp
)
target_link_libraries(RequestHandlers Common)
diff --git a/src/Common/Requests/CMakeLists.txt b/src/Common/Requests/CMakeLists.txt
index 1d49f0e..54b14e1 100644
--- a/src/Common/Requests/CMakeLists.txt
+++ b/src/Common/Requests/CMakeLists.txt
@@ -1,6 +1,6 @@
include_directories(${INCLUDES})
-add_library(Requests
+add_library(Requests STATIC
DisconnectRequest.cpp IdentifyRequest.cpp SimpleRequest.cpp UserInfoRequest.cpp
)
target_link_libraries(Requests ${KRB5_LIBRARIES})