ML各位

いつも、お世話になっております。内山と申します。
よろしくお願いいたします。
7.1-RELEASE の make buildworld でご教示頂きたい
ことがあり、メールさせて頂きます。ネームサーバーに
使っている FreeBSD 6.4 上での make buildworld は
一発で通ったのですが、ルーターに使用している 6.4
上で7.1 をmake buildworld すると下に引用するような
エラーで途中でこけます。types.h と bsd-statvfs.h で
二重に fsbkcnt_t を定義してるからいけないということ
で、最初は bsd-statvfs.h の該当部分をコメントアウト

//#ifndef HAVE_FSBLKCNT_T
//typedef unsigned long fsblkcnt_t;
//#endif
//#ifndef HAVE_FSFILCNT_T
//typedef unsigned long fsfilcnt_t;
//#endif

して、buildworld を通しました。
本当だったらソースを読んで解析して正しい方法を考えるか、
なぜ、ここでこけるのか考えるのが正しいのかと思いますが、
実力と時間がないため次のような方法で buildworld を
通しました。
わざわざ、types.h でなく特殊なインクルードファイルを
インクルードしてるのだから
そっちの定義を尊重した方が良いだろうということで、

/usr/src/secure/libexec/ssh-keysig

の

Makefile

のCFLAGSを

CFLAGS+=-I${SSHDIR} -include ssh_namespace.h -D_FSBLKCNT_T_DECLARED

のように変更して buildworld を通しました。
しかし、これでよいのか心配なので、メールした次第です。
何がいけないか、ご教示頂ければ幸いです。/etc/make.conf
も載せておきます。

---/etc/make.conf-----
NO_SENDMAIL = true
WRKDIRPFREFIX = /var/tmp
PERL_VER=5.8.8
PERL_VERSION=5.8.8
#COURIER IMAP CRAM-MD5 authentication
WITH_CRAM=yes
CFLAGS= -O -pipe
NO_PROFILE= true
X_WINDOW_SYSTEM=xorg

----------------7.1の make buildworld のエラー-------
cc -O -pipe
-I/usr/src/secure/libexec/sftp-server/../../../crypto/openssh -include
ssh_namespace.h -DNO_IDEA -c
/usr/src/secure/libexec/sftp-server/../../../crypto/openssh/sftp-server-main.c
cc -O -pipe
-I/usr/src/secure/libexec/sftp-server/../../../crypto/openssh -include
ssh_namespace.h -DNO_IDEA -o sftp-server sftp-server.o sftp-common.o
sftp-server-main.o -lssh -lcrypt -lcrypto -lz
gzip -cn
/usr/src/secure/libexec/sftp-server/../../../crypto/openssh/sftp-server.8
> sftp-server.8.gz
===> secure/libexec/ssh-keysign (all)
cc -O -pipe
-I/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh -include
ssh_namespace.h -DNO_IDEA -c
/usr/src/secure/libexec/ssh-keysign/ssh-keysign.c
In file included from
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/openbsd-compat.h:44,
from /usr/src/secure/libexec/ssh-keysign/includes.h:189,
from /usr/src/secure/libexec/ssh-keysign/ssh-keysign.c:24:
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/vis.h:85:
warning: '__bounded__' attribute directive ignored
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/vis.h:87:
warning: '__bounded__' attribute directive ignored
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/vis.h:91:
warning: '__bounded__' attribute directive ignored
In file included from
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/openbsd-compat.h:46,
from /usr/src/secure/libexec/ssh-keysign/includes.h:189,
from /usr/src/secure/libexec/ssh-keysign/ssh-keysign.c:24:
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/sha2.h:80:
warning: '__bounded__' attribute directive ignored
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/sha2.h:83:
warning: '__bounded__' attribute directive ignored
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/sha2.h:85:
warning: '__bounded__' attribute directive ignored
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/sha2.h:87:
warning: '__bounded__' attribute directive ignored
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/sha2.h:89:
warning: '__bounded__' attribute directive ignored
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/sha2.h:92:
warning: '__bounded__' attribute directive ignored
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/sha2.h:92:
warning: '__bounded__' attribute directive ignored
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/sha2.
h:116: warning: '__bounded__' attribute directive ignored
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/sha2.h:119:
warning: '__bounded__' attribute directive ignored
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/sha2.h:121:
warning: '__bounded__' attribute directive ignored
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/sha2.h:123:
warning: '__bounded__' attribute directive ignored
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/sha2.h:125:
warning: '__bounded__' attribute directive ignored
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/sha2.h:128:
warning: '__bounded__' attribute directive ignored
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/sha2.h:128:
warning: '__bounded__' attribute directive ignored
In file included from
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/openbsd-compat.h:147,
from /usr/src/secure/libexec/ssh-keysign/includes.h:189,
from /usr/src/secure/libexec/ssh-keysign/ssh-keysign.c:24:
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/bsd-statvfs.h:30:
error: conflicting types for 'fsblkcnt_t'
/usr/obj/usr/src/tmp/usr/include/sys/types.h:163: error: previous
declaration of
'fsblkcnt_t' was here
/usr/src/secure/libexec/ssh-keysign/../../../crypto/openssh/openbsd-compat/bsd-statvfs.h:33:
error: conflicting types for 'fsfilcnt_t'
/usr/obj/usr/src/tmp/usr/include/sys/types.h:164: error: previous
declaration of 'fsfilcnt_t' was here
*** Error code 1

Stop in /usr/src/secure/libexec/ssh-keysign.
*** Error code 1

Stop in /usr/src/secure/libexec.
*** Error code 1

Stop in /usr/src/secure.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.


-- 
Toshio Uchiyama  uchiy...@shonan.homeunix.org

メールによる返信