summaryrefslogtreecommitdiff
path: root/src/plugin.c
diff options
context:
space:
mode:
authorKrzysztof Krzyżaniak <eloy@debian.org>2009-03-18 10:20:09 +0000
committerKrzysztof Krzyżaniak <eloy@debian.org>2009-03-18 10:20:09 +0000
commitba7de25b4464c5bdc25e2c559c3760f19e2b240a (patch)
treeb49c5aa3b3ac6be16de774f8ae502c21ae7b0626 /src/plugin.c
parentfd9cddc7b9d8062a6f8ba4b506c41a86ff22e2df (diff)
downloadlighttpd-ba7de25b4464c5bdc25e2c559c3760f19e2b240a.tar.gz
new upstream version
Diffstat (limited to 'src/plugin.c')
-rw-r--r--src/plugin.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugin.c b/src/plugin.c
index faf5520..68eab65 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -131,12 +131,12 @@ int plugins_load(server *srv) {
buffer_copy_string_buffer(srv->tmp_buf, srv->srvconf.modules_dir);
- buffer_append_string(srv->tmp_buf, "/");
+ buffer_append_string_len(srv->tmp_buf, CONST_STR_LEN("/"));
buffer_append_string(srv->tmp_buf, modules);
#if defined(__WIN32) || defined(__CYGWIN__)
- buffer_append_string(srv->tmp_buf, ".dll");
+ buffer_append_string_len(srv->tmp_buf, CONST_STR_LEN(".dll"));
#else
- buffer_append_string(srv->tmp_buf, ".so");
+ buffer_append_string_len(srv->tmp_buf, CONST_STR_LEN(".so"));
#endif
p = plugin_init();
@@ -173,7 +173,7 @@ int plugins_load(server *srv) {
#endif
buffer_reset(srv->tmp_buf);
buffer_copy_string(srv->tmp_buf, modules);
- buffer_append_string(srv->tmp_buf, "_plugin_init");
+ buffer_append_string_len(srv->tmp_buf, CONST_STR_LEN("_plugin_init"));
#ifdef __WIN32
init = GetProcAddress(p->lib, srv->tmp_buf->ptr);
@@ -197,7 +197,7 @@ int plugins_load(server *srv) {
#else
#if 1
- init = (int (*)(plugin *))dlsym(p->lib, srv->tmp_buf->ptr);
+ init = (int (*)(plugin *))(intptr_t)dlsym(p->lib, srv->tmp_buf->ptr);
#else
*(void **)(&init) = dlsym(p->lib, srv->tmp_buf->ptr);
#endif