HaxeFoundation / neko

The Neko Virtual Machine
https://nekovm.org
Other
552 stars 107 forks source link

Fix MSG_NOSIGNAL warning on MacOS 11 #217

Closed mitchblank closed 2 years ago

mitchblank commented 3 years ago

As I discussed at https://github.com/HaxeFoundation/neko/issues/215#issuecomment-745617663 :

    libs/common/socket.c:51:10: warning: 'MSG_NOSIGNAL' macro redefined [-Wmacro-redefined]
    #       define MSG_NOSIGNAL 0
               ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/sys/socket.h:584:9: note: previous definition is here
    #define MSG_NOSIGNAL    0x80000         /* do not generate SIGPIPE on EOF */
            ^

It seems most likely any system that defines MSG_NOSIGNAL wants to use it here, so redefining it to 0 is probably not what we want to do.