summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2021-01-23 18:26:05 +1100
committerDarren Tucker <dtucker@dtucker.net>2021-01-23 18:28:37 +1100
commit95eca1e195a3b41baa1a725c2c5af8a09d885e4b (patch)
treee6a1da59755841ea948562aa491ac9a5a94d08e5
parent6ffdcdda128045226dda7fbb3956407978028a1e (diff)
ifdef new instance of sin6_scope_id
Put inside HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID similar to existing instance. Should fix error on UnixWare 7.
-rw-r--r--addr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/addr.c b/addr.c
index d9b1927e..ba0fad4e 100644
--- a/addr.c
+++ b/addr.c
@@ -92,7 +92,9 @@ addr_xaddr_to_sa(const struct xaddr *xa, struct sockaddr *sa, socklen_t *len,
in6->sin6_family = AF_INET6;
in6->sin6_port = htons(port);
memcpy(&in6->sin6_addr, &xa->v6, sizeof(in6->sin6_addr));
+#ifdef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
in6->sin6_scope_id = xa->scope_id;
+#endif
break;
default:
return -1;