Cannot compile PHP

When you compile php (5.0.4) with both mysql and imap (imap-2004a - imap-2004d), I found a small problem. It turns out that both applications define the function hash_reset. This causes the following linker error:

/usr/local/imap-2004d//lib/libc-client.a(misc.o)(.text+0x8a4): In function `hash_reset':
/var/source/php-tarballs/imap-2004d/c-client/misc.c:278: multiple definition of `hash_reset'
/usr/lib/mysql/libmysqlclient.a(hash.o)(.text+0x130): first defined here
/usr/bin/ld: Warning: size of symbol `hash_reset' changed from 94 in /usr/lib/mysql/libmysqlclient.a(hash.o) to 89 in /usr/lib/mysql/libmysqlclient.a(hash.o)
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1
[root@gadgetwiz php-5.0.4]#

The fix is pretty simple. You can modify the imap-2004d source code to use the function name hash_reset2 instead of hash_reset. Just change all occurences of hash_reset to hash_reset2.

src/c-client/mail.c:  hash_reset2 (ht);         /* discard containers, reset ht */
src/c-client/misc.c:    hash_reset2 (*hashtab); /* reset hash table */
src/c-client/misc.c:void hash_reset2 (HASHTAB *hashtab)
src/c-client/misc.h:void hash_reset2 (HASHTAB *hashtab);