Project

General

Profile

Actions

Bug #1610

closed

mod_extforward.c fails to compile with gcc

Added by Anonymous almost 17 years ago. Updated over 8 years ago.

Status:
Obsolete
Priority:
Normal
Category:
mod_extforward
Target version:
ASK QUESTIONS IN Forums:

Description


mod_extforward.c: In function `ipstr_to_sockaddr':
mod_extforward.c:299: error: storage size of 'hints' isn't known
mod_extforward.c:313: error: `AI_NUMERICHOST' undeclared (first use in this func
tion)
mod_extforward.c:313: error: (Each undeclared identifier is reported only once
mod_extforward.c:313: error: for each function it appears in.)
mod_extforward.c:315: warning: implicit declaration of function `getaddrinfo'
mod_extforward.c:318: warning: implicit declaration of function `gai_strerror'
mod_extforward.c:318: warning: format argument is not a pointer (arg 4)
mod_extforward.c:318: warning: format argument is not a pointer (arg 4)
mod_extforward.c:319: error: `EAI_SYSTEM' undeclared (first use in this function
)
mod_extforward.c:299: warning: unused variable `hints'
mod_extforward.c: In function `mod_extforward_uri_handler':
mod_extforward.c:396: warning: unused variable `addrs_left'
make[2]: *** [mod_extforward.lo] Error 1
make[2]: Leaving directory `/cygdrive/c/lighttpd-1.4.19/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/cygdrive/c/lighttpd-1.4.19'
make: *** [all] Error 2
Actions #1

Updated by stbuehler over 16 years ago

You could try the following patch (save in a file and do {{{patch -p1 < thefilename}}} in the source directory):


diff a/src/mod_extforward.c b/src/mod_extforward.c
--- a/src/mod_extforward.c
+++ b/src/mod_extforward.c
@@ -7,6 +7,8 @@
 #include <string.h>
 #include <stdio.h>
 #include <netinet/in.h>
+#include <sys/socket.h>
+#include <netdb.h>

 #include "base.h" 
 #include "log.h" 

But i guess your glibc could just be too old; what version do you have?

Actions #2

Updated by stbuehler over 16 years ago

  • Status changed from New to Fixed
  • Resolution set to worksforme

Closed as feedback is missing. Please reopen if it is really a bug and you can provide more information (OS? version of your libraries? tried patch?...)

Actions #3

Updated by stbuehler about 16 years ago

  • Status changed from Fixed to Missing Feedback
Actions #4

Updated by docwhat almost 16 years ago

  • Status changed from Missing Feedback to Reopened
  • Assignee set to stbuehler

I'm not the original reporter, but I'm having the same problem and will happily help trouble shoot it.

I applied the patch in comment #1 and it didn't help:

gcc -DHAVE_CONFIG_H -DLIBRARY_DIR=\"/usr/local/vivisimo/lib\" -DSBIN_DIR=\"/usr/local/vivisimo/sbin\" -I. -I.. -D_REENTRANT -D__EXTENSIONS__ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -I/cygdrive/c/checkouts/holtje/vivisimo/ext/include -D_REENTRANT -fPIC -DACL_SUPPORT -D_REENTRANT -DACL_SUPPORT -O9 -I/cygdrive/c/checkouts/holtje/vivisimo/ext/include -Wall -W -Wshadow -pedantic -std=gnu99 -MT mod_extforward.lo -MD -MP -MF .deps/mod_extforward.Tpo -c mod_extforward.c  -DDLL_EXPORT -DPIC -o .libs/mod_extforward.o
mod_extforward.c:1: warning: -fPIC ignored for target (all code is position independent)
mod_extforward.c: In function `ipstr_to_sockaddr':
mod_extforward.c:301: error: storage size of 'hints' isn't known
mod_extforward.c:315: error: `AI_NUMERICHOST' undeclared (first use in this function)
mod_extforward.c:315: error: (Each undeclared identifier is reported only once
mod_extforward.c:315: error: for each function it appears in.)
mod_extforward.c:317: warning: implicit declaration of function `getaddrinfo'
mod_extforward.c:320: warning: implicit declaration of function `gai_strerror'
mod_extforward.c:320: warning: format argument is not a pointer (arg 4)
mod_extforward.c:320: warning: format argument is not a pointer (arg 4)
mod_extforward.c:321: error: `EAI_SYSTEM' undeclared (first use in this function)
mod_extforward.c:301: warning: unused variable `hints'
mod_extforward.c: In function `mod_extforward_uri_handler':
mod_extforward.c:398: warning: unused variable `addrs_left'
make[3]: *** [mod_extforward.lo] Error 1

Like the original author, I'm compiling under cygwin.

Possibly related forum posts:
Actions #5

Updated by stbuehler over 15 years ago

  • Assignee deleted (stbuehler)
  • Patch available set to No
Actions #6

Updated by gstrauss over 8 years ago

  • Missing in 1.5.x set to Yes

FYI: compiles fine under cygwin on lighttpd 1.4.x

Actions #7

Updated by gstrauss over 8 years ago

  • Status changed from Reopened to Obsolete
Actions

Also available in: Atom