include sys/socket.h if possible (this should make rsync compile