INADDR_NONE is nonstandard. Use (in_addr_t)(-1) instead.