libnetをインストール
db4を削除して環境をこわし、再構築しているときにlibnetをソースからインストールしました。ものはここから持っていけます。
このlibnet、ソースを展開してもいまどきっぽくなくてconfigureはありません。readme.txtをみるとmakfiles以下にある*.makから適当なファイルをport.makって名前でコピーしてmakeすればいいみたい。Linuxの場合だとmakfiles/linux.makをport.makとコピーしてmake。やっぱりエラーになるね。
gcc -O2 -Wall -Werror -Wno-unused -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g -I../include -Iinclude -DTARGET_LINUX -c -o drivers/ipxsocks.o drivers/ipxsocks.c cc1: warnings being treated as errors drivers/ipxsocks.c: In function ‘poll_ipx_socket’: drivers/ipxsocks.c:192: warning: pointer targets in passing argument 6 of ‘recvfrom’ differ in signedness drivers/ipxsocks.c: In function ‘init’: drivers/ipxsocks.c:340: warning: dereferencing type-punned pointer will break strict-aliasing rules drivers/ipxsocks.c:355: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness drivers/ipxsocks.c: In function ‘init_channel’: drivers/ipxsocks.c:399: warning: pointer targets in passing argument 1 of ‘write_32’ differ in signedness drivers/ipxsocks.c: In function ‘update_target’: drivers/ipxsocks.c:422: warning: pointer targets in passing argument 1 of ‘write_32’ differ in signedness make[1]: *** [drivers/ipxsocks.o] Error 1 make[1]: Leaving directory `/home/hoge/libnet/libnet/lib' make: *** [lib] Error 2
んーとなんのエラーかな。。ってエラーじゃないな。warningをエラーとして解釈しているみたい。gccの-Werrorってのが怪しいな。これを消してみる。
port.makのWARNING_FLAGSを変更。
#WARNING_FLAGS = -Wall -Werror -Wno-unused -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations WARNING_FLAGS = -Wall -Wno-unused -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
これでmakeできました。