Use <pulsecore/socket.h> instead of <sys/socket.h>