The socket.h file on macos does not have HAVE_MSG_DONTWAIT despite having MSG_DONTWAIT, which means macos having MSG_DONTWAIT is not detected, causing a redefine in net.cpp:
net.cpp:53:9: warning: 'MSG_DONTWAIT' macro redefined [-Wmacro-redefined]
#define MSG_DONTWAIT 0
^
/usr/include/sys/socket.h:556:9: note: previous definition is here
#define MSG_DONTWAIT 0x80 /* this message should be nonblocking */
The HAVE_MSG_NOSIGNAL a few lines above is not causing a warning so presumably it's fine, but maybe it would be better to change that to !defined(MSG_NOSIGNAL) as well..