fetch.c added defines for compatibility with freebsd libc