--- mDNSPosix/mDNSPosix.c.orig +++ mDNSPosix/mDNSPosix.c @@ -645,7 +645,8 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf // to bind to the socket. Our suggestion was to switch the order in which // SO_REUSEPORT and SO_REUSEADDR was tested so that SO_REUSEADDR stays on // top and SO_REUSEPORT to be used only if SO_REUSEADDR doesn't exist. - #if defined(SO_REUSEADDR) && !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) + #if defined(SO_REUSEADDR) && !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) \ + && !defined(__FreeBSD__) err = setsockopt(*sktPtr, SOL_SOCKET, SO_REUSEADDR, &kOn, sizeof(kOn)); #elif defined(SO_REUSEPORT) err = setsockopt(*sktPtr, SOL_SOCKET, SO_REUSEPORT, &kOn, sizeof(kOn));