[net] Avoid redefining MSG_DONTWAIT on macos #10054

pull kallewoof wants to merge 1 commits into bitcoin:master from kallewoof:fix-macos-msg-dontwant changing 1 files +1 −1
  1. kallewoof commented at 7:07 PM on March 22, 2017: member

    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..

  2. Check for MSG_DONTWAIT instead of HAVE_MSG_DONTWAIT to avoid redefine on macos. 62ba62a7ed
  3. kallewoof renamed this:
    [net] Avoid redefining MSG_DONTHAVE on macos
    [net] Avoid redefining MSG_DONTWAIT on macos
    on Mar 22, 2017
  4. paveljanik commented at 8:20 PM on March 22, 2017: contributor

    NACK

    What do you have in configure output on this line?

    checking for MSG_DONTWAIT... yes
    

    And here:

    $ grep DONT src/config/bitcoin-config.h
    /* Define this symbol if you have MSG_DONTWAIT */
    #define HAVE_MSG_DONTWAIT 1
    $
    
  5. kallewoof commented at 8:37 PM on March 22, 2017: member

    @paveljanik Ahh, I somehow thought the HAVEs were OS defined, not bitcoin defined.

    checking for MSG_DONTWAIT... yes
    

    and

    $ grep DONT src/config/bitcoin-config.h
    $ 
    
  6. paveljanik commented at 8:39 PM on March 22, 2017: contributor

    And

    grep DONT src/config/bitcoin-config.h.in
    

    Are you on current master?

  7. kallewoof commented at 8:39 PM on March 22, 2017: member

    Nothing. Yes, I'm on current master. (02d64bd929c9663ba38e96721c6dbd89972d043d)

  8. paveljanik commented at 8:42 PM on March 22, 2017: contributor

    So please run configure with -x (bash -x ./configure or similar) and save the complete log somewhere and investigate why it is not written there please.

  9. kallewoof commented at 8:42 PM on March 22, 2017: member

    Wait, I think this is me needing to autogen.sh. Trying that. If that's not it I'll do what you said, thanks.

  10. kallewoof closed this on Mar 22, 2017

  11. paveljanik commented at 8:43 PM on March 22, 2017: contributor

    Great, thanks!

  12. kallewoof deleted the branch on Mar 13, 2018
  13. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me