[uaa@localhost sj3]$ gmake level1.o
cc -g -Wall -Wno-unused-parameter -fPIC -I. -c -o level1.o level1.c
level1.c:30 から include されたファイル中:
config.h:120:3: 警告: #warning No suitable endian.h could be found.
config.h:121:3: 警告: #warning Please e-mail the maintainers with your OS.
level1.c: 関数 `open_unix' 内:
level1.c:310: error: incompatible type for argument 2 of `connect'
level1.c: 関数 `open_inet' 内:
level1.c:363: error: incompatible type for argument 2 of `connect'
…は?
310:
if (connect(fd, (struct sockaddr *)&sunix, len) ==
ERROR) {
sj3_error_number = SJ3_ConnectSocket;
return ERROR;
}
363:
ret = connect(fd, (struct sockaddr *)&sin, sizeof(sin));
特段おかしなコードには見えないんだけど…Vine2.5とかイマドキの環境では問題なく通ってるのに。
試しに、IPv4の閉じた環境で簡単なファイル転送を行うツール https://github.com/jg1uaa/txf-unix をVine 4.2でビルドしたけどこれは問題なかった。教科書にあるような、socket()やconnect()の使い方をしているので問題は無いはずなんだけど…これと同じ書き方をしているのにlevel1.cがエラーを出すというのがどうにも解せない。
Vine 4.2を動かす(仮想)マシンの問題か?ということでVMware Player→VirtualBoxのV2Vも試しているけど状況変わりません。