Skip to content

Conversation

practicalswift
Copy link
Contributor

@practicalswift practicalswift commented Apr 20, 2017

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
…

@practicalswift practicalswift force-pushed the silence-msg_dontwait-warning branch from 715b51c to b8b1e80 Compare April 20, 2017 23:06
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
…
```
@practicalswift practicalswift force-pushed the silence-msg_dontwait-warning branch from b8b1e80 to 1eeee49 Compare April 20, 2017 23:12
@luke-jr
Copy link
Member

luke-jr commented Apr 20, 2017

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

@theuni
Copy link
Member

theuni commented Apr 20, 2017

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

@practicalswift
Copy link
Contributor Author

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

@practicalswift practicalswift deleted the silence-msg_dontwait-warning branch April 10, 2021 19:30
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants