【なし】雪だるま作戦に思いを馳せながら雑談するスレッド Part19

このエントリーをはてなブックマークに追加
216stream ◆ap/yuix/tw
SunOsさん最近見てるのかな?
mod_authz_iplistをFedoraCore4でコンパイルしたところ、エラーになってしまいました。

# apxs -c mod_authz_iplist.c
/usr/lib/apr/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables
-DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/apr-0 -I/usr/include/httpd -c -o mod_authz_iplist.lo mod_authz_iplist.c && touch mod_authz_iplist.slo
mod_authz_iplist.c: In function 'is_hit_ip':
mod_authz_iplist.c:189: error: 'in6_addr_t' undeclared (first use in this function)
mod_authz_iplist.c:189: error: (Each undeclared identifier is reported only once
mod_authz_iplist.c:189: error: for each function it appears in.)
mod_authz_iplist.c:189: error: syntax error before ')' token
mod_authz_iplist.c:189: error: syntax error before ')' token
mod_authz_iplist.c:189: error: syntax error before ')' token
mod_authz_iplist.c:204: error: syntax error before ')' token
mod_authz_iplist.c:204: error: syntax error before ')' token
mod_authz_iplist.c:204: error: syntax error before ')' token
mod_authz_iplist.c: In function 'regist_host':
mod_authz_iplist.c:227: warning: pointer targets in passing argument 2 of 'apr_pstrmemdup' differ in signedness
mod_authz_iplist.c:239: warning: pointer targets in passing argument 2 of 'ap_pregcomp' differ in signedness
mod_authz_iplist.c: In function 'is_hit_host':
mod_authz_iplist.c:262: warning: pointer targets in passing argument 2 of 'ap_regexec' differ in signedness
217stream ◆ap/yuix/tw :2005/09/06(火) 10:44:47
mod_authz_iplist.c: In function 'update_list':
mod_authz_iplist.c:320: warning: pointer targets in passing argument 2 of 'apr_pstrmemdup' differ in signedness
mod_authz_iplist.c:320: warning: pointer targets in assignment differ in signedness
mod_authz_iplist.c:321: warning: pointer targets in passing argument 1 of '__builtin_strchr' differ in signedness
mod_authz_iplist.c:321: warning: pointer targets in assignment differ in signedness
mod_authz_iplist.c:324: warning: pointer targets in passing argument 2 of 'apr_ipsubnet_create' differ in signedness
mod_authz_iplist.c:324: warning: pointer targets in passing argument 3 of 'apr_ipsubnet_create' differ in signedness
mod_authz_iplist.c:330: warning: pointer targets in passing argument 1 of 'ap_str_tolower' differ in signedness
mod_authz_iplist.c:331: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
mod_authz_iplist.c: In function 'iplist_access_checker':
mod_authz_iplist.c:483: error: 'in6_addr_t' undeclared (first use in this function)
mod_authz_iplist.c:483: error: syntax error before ')' token
mod_authz_iplist.c:483: error: syntax error before ')' token
mod_authz_iplist.c:483: error: syntax error before ')' token
mod_authz_iplist.c:492: warning: pointer targets in passing argument 2 of 'is_hit_host' differ in signedness
mod_authz_iplist.c:492: warning: pointer targets in passing argument 3 of 'is_hit_host' differ in signedness
apxs:Error: Command failed with rc=65536
218stream ◆ap/yuix/tw :2005/09/06(火) 10:46:45
んで、

【ラムネ】雪だるま作戦に思いを馳せながら雑談するスレッド Part7
http://aa5.2ch.net/test/read.cgi/nanmin/1121626122/567
>567 名前:▲ ◆cZfSunOs.U [sage] 投稿日:2005/07/18(月) 11:02:09
(略)
>ということで再び mod_authz_iplist の宣伝を(ry
>
># ホスト名を記述しない限り逆引きは行わないのでご安心を.
># FreeBSD では -Din6_addr_t=struct\ in6_addr を指定しないと
># コンパイルエラーになるかも知れません.
(略)


を参考に、
#apxs -c -D in6_addr_t="struct\ in6_addr" mod_authz_iplist.c
でうまくいきました。