Project

General

Profile

Bug #2548

cannot build statically compiled lighttpd

Added by bwalker@musings.com almost 4 years ago. Updated almost 2 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
2014-01-15
Due date:
% Done:

100%

Estimated time:
0.50 h
Missing in 1.5.x:
No

Description

Can not build a statically compiled lighttpd.

When trying to compile a statically built lighttpd, you need to have LIGHTTPD_STATIC defined. On uCLinux, which has no dynamic linking, the file <dlfcn.h> is always included if not on a WIN32 machine. This is not correct for a static build.

Here is the patch..

diff --git a/src/plugin.c b/src/plugin.c
index 55f8b03..bbc9c0d 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -6,11 +6,12 @@

 #include <stdio.h>

+
 #ifdef HAVE_VALGRIND_VALGRIND_H
 # include <valgrind/valgrind.h>
 #endif

-#ifndef __WIN32
+#if !defined(__WIN32) && !defined(LIGHTTPD_STATIC)
 # include <dlfcn.h>
 #endif
 /*
@@ -99,7 +100,9 @@ static int plugins_register(server *srv, plugin *p) {
  *
  */
epeg1000e.conf (2.37 KB) epeg1000e.conf mariannaf, 2014-01-15 10:37
php.ini (48.9 KB) php.ini mariannaf, 2014-01-15 10:37

Related issues

Copied from Bug #2545: HTTP 413 - request entity too largeMissing Feedback2014-01-15

Associated revisions

Revision 3087 (diff)
Added by stbuehler almost 2 years ago

[plugins] don't include dlfcn.h if not needed (fixes #2548)

From: Stefan Bühler <>

Revision 02594f10 (diff)
Added by stbuehler almost 2 years ago

[plugins] don't include dlfcn.h if not needed (fixes #2548)

From: Stefan Bühler <>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3087 152afb58-edef-0310-8abb-c4023f1b3aa9

History

#1

Updated by gstrauss almost 2 years ago

Straightforward patch. Can it be applied and this ticket closed?

#2

Updated by stbuehler almost 2 years ago

  • Description updated (diff)
#3

Updated by stbuehler almost 2 years ago

  • Target version changed from 1.4.x to 1.4.40
#4

Updated by stbuehler almost 2 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset r3087.

Also available in: Atom