Fixed log.c to do the casting properly to work on openbsd.