use pointer to addrlen according to POSIX, it's unused anyway
for some reason libc doesn't provide strdup, so put it into our ugly compat file for now