PHP 5.2.1がコンパイル出来ない

OpenBSD 3.9にインストールしたPHP 5.2.0を5.2.1にしようとしたが、コンパイル中にエラーで止まる。
どうもPHP 5.2.1のバグらしい。
参考:http://bugs.php.net/bug.php?id=40410


エラーメッセージはこんな感じ。

/www/build/scripts/php-5.2.1/ext/posix/posix.c: In
function `zif_posix_getgrgid':
/www/build/scripts/php-5.2.1/ext/posix/posix.c:889:
error: `_SC_GETGR_R_SIZE_MAX' undeclared (first use in
this function)
/www/build/scripts/php-5.2.1/ext/posix/posix.c:889:
error: (Each undeclared identifier is reported only once
/www/build/scripts/php-5.2.1/ext/posix/posix.c:889:
error: for each function it appears in.)
make: *** [ext/posix/posix.lo] Error 1


上記URLに、スナップショット版を使えとあるので、下記URLからダウンロードする。
http://snaps.php.net/


後は、以前にPHP 5.2.0をインストールした手順でインストールする。

$ ftp http://snaps.php.net/php5.2-200702201330.tar.gz
$ tar xzvf php5.2-200702201330.tar.gz
$ cd php5.2-200702201330
$ ./configure --prefix=/usr/local/php-5.2-devel \
 --enable-mbstring \
 --with-apxs2=/usr/local/apache22/bin/apxs \
 --with-mysql=/usr/local/mysql
$ make
$ su
# make install