From 53a9740d1dcbad6be4b4c1a10a5f3fcbb97a5be9 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 25 Feb 2024 17:13:38 -0800 Subject: fixes #1496 Provide NNG_ENABLE_IPV6 option (disabled by default) This also checks if the build system has the definitions for AF_INET6, which might help in some embedded IPv4 only settings. The resolver test is enhanced to include a check for IPv6 enabled in the kernel. IPv6 support is enabled by default, of course. --- src/sp/protocol.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/sp/protocol.c') diff --git a/src/sp/protocol.c b/src/sp/protocol.c index 512b27cc..d64c85a3 100644 --- a/src/sp/protocol.c +++ b/src/sp/protocol.c @@ -12,7 +12,6 @@ #include "core/nng_impl.h" - int nni_proto_open(nng_socket *sip, const nni_proto *proto) { @@ -21,8 +20,8 @@ nni_proto_open(nng_socket *sip, const nni_proto *proto) if ((rv = nni_sock_open(&sock, proto)) == 0) { nng_socket s; - s.id = nni_sock_id(sock); // Keep socket held open. - *sip = s; + s.id = nni_sock_id(sock); // Keep socket held open. + *sip = s; } return (rv); } -- cgit v1.2.3-70-g09d2