Mac OS-X seems to keep malloc.h in malloc/malloc.h.  Put an #ifdef __APPLE__ around the include.