Fix build on SmartOS due to missing IPV6_V6ONLY.

Thanks to Matt Ingenthron.

Closes #1212.
pull/1239/head
Roger A. Light 7 years ago
parent cba3380b98
commit fb1979c0ea

@ -47,6 +47,9 @@ Client features:
- Add explicit support for TLS v1.3.
- Drop support for TLS v1.0.
Broker fixes:
- Fix build on SmartOS due to missing IPV6_V6ONLY. Closes #1212.
Client fixes:
- mosquitto_pub wouldn't always publish all messages when using `-l` and
QoS>0. This has been fixed.

@ -470,8 +470,10 @@ int net__socket_listen(struct mosquitto__listener *listener)
ss_opt = 1;
setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &ss_opt, sizeof(ss_opt));
#endif
#ifdef IPV6_V6ONLY
ss_opt = 1;
setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &ss_opt, sizeof(ss_opt));
#endif
if(net__socket_nonblock(&sock)){
return 1;

Loading…
Cancel
Save