Silence "warning: "MSG_DONTWAIT" redefined" when compiling under Linux #10246

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:silence-msg_dontwait-warning changing 1 files +6 −0
  1. practicalswift commented at 11:02 PM on April 20, 2017: contributor

    Handle the case where !defined(HAVE_MSG_DONTWAIT) does not imply !defined(MSG_DONTWAIT).

    Prior to this commit:

    $ make
    …
      CXX      libbitcoin_server_a-net.o
    net.cpp:55:0: warning: "MSG_DONTWAIT" redefined
     #define MSG_DONTWAIT 0
     ^
    In file included from /usr/include/x86_64-linux-gnu/sys/socket.h:38:0,
                     from compat.h:38,
                     from netaddress.h:12,
                     from addrman.h:9,
                     from net.h:10,
                     from net.cpp:10:
    /usr/include/x86_64-linux-gnu/bits/socket.h:195:0: note: this is the location of the previous definition
     #define MSG_DONTWAIT MSG_DONTWAIT
     ^
    …
    

    After this commit:

    $ make
    …
      CXX      libbitcoin_server_a-net.o
    …
    
  2. practicalswift force-pushed on Apr 20, 2017
  3. Silence "warning: "MSG_DONTWAIT" redefined" when compiling under Linux
    Handle the case where !defined(HAVE_MSG_DONTWAIT) does not imply !defined(MSG_DONTWAIT).
    
    Prior to this commit:
    
    ```
    $ make
    …
      CXX      libbitcoin_server_a-net.o
    net.cpp:55:0: warning: "MSG_DONTWAIT" redefined
     #define MSG_DONTWAIT 0
     ^
    In file included from /usr/include/x86_64-linux-gnu/sys/socket.h:38:0,
                     from compat.h:38,
                     from netaddress.h:12,
                     from addrman.h:9,
                     from net.h:10,
                     from net.cpp:10:
    /usr/include/x86_64-linux-gnu/bits/socket.h:195:0: note: this is the location of the previous definition
     #define MSG_DONTWAIT MSG_DONTWAIT
     ^
    …
    ```
    
    After this commit:
    
    ```
    $ make
    …
      CXX      libbitcoin_server_a-net.o
    …
    ```
    1eeee497ae
  4. practicalswift force-pushed on Apr 20, 2017
  5. luke-jr commented at 11:13 PM on April 20, 2017: member

    This is not the correct fix. When it's defined, configure should also define HAVE_MSG_DONTWAIT

  6. theuni commented at 11:14 PM on April 20, 2017: member

    Yet another case of this :(. See #10228 for the fix.

  7. practicalswift closed this on Apr 20, 2017

  8. practicalswift commented at 11:22 PM on April 20, 2017: contributor

    @luke-jr @theuni Thanks for the quick review! @theuni got this covered in #10228, so closing this PR.

  9. practicalswift deleted the branch on Apr 10, 2021
  10. DrahtBot locked this on Aug 16, 2022

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-16 15:15 UTC

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