From: Yukihiro Matsumoto Date: 2009-08-20T01:09:20+09:00 Subject: [ruby-dev:39136] Re: [Bug #1919] sparc-solaris-2.10 で 1.9.2-preview1 がビルドできない まつもと ゆきひろです In message "Re: [ruby-dev:39132] Re: [Bug #1919] sparc-solaris-2.10 で 1.9.2-preview1 がビルドできない" on Wed, 19 Aug 2009 22:42:58 +0900, Naohisa GOTO writes: |> Solaris の readdir_r について調べてみたところ、 |> "readdir_r considered harmful" |> http://womble.decadentplace.org.uk/readdir_r-advisory.html |> という文章を見つけました。これによると、 |> |> > On Linux (with glibc) and most versions of Unix, struct dirent |> > is large enough to hold maximum-length names from most filesystems, |> > so this is safe (though > wasteful). This is not true of Solaris |> > and BeOS, where the d_name member is an array of length 1. |> |> とのことでした。どうやら Solaris では、struct dirent entry のメモリを |> 確保する際、ファイル名の長さを考慮に入れた十分な長さを自前で確保する |> 必要があるようです。 | |とりあえずは、共用体にして無理矢理メモリを確保すると、make は通り、 |make install できました。以下にパッチを添付します。 ありがとうございます。取り込みます。fpathconfを使ったパッチ が提供されればそれも考慮します。