Compiling Asterisk 1.6.2 on Snow Leopard 10.6.2

I’ve been trying to compile Asterisk 1.6.2 on Snow Leopard 10.6.2 and those messages came:

[CC] poll.c -> poll.o
poll.c: In function ‘map_poll_spec’:
poll.c:138: warning: implicit declaration of function ‘MAX’
[LD] hashtest2.o md5.o utils.o strings.o astobj2.o sha1.o strcompat.o threadstorage.o clicompat.o poll.o -> hashtest2
Undefined symbols:
"_MAX", referenced from:
_ast_internal_poll in poll.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [hashtest2] Error 1
make: *** [utils] Error 2

Any ideas?!

Thanks in advance.