From 79c086868f2b14e59b33ac9c3fb366c28721c8a3 Mon Sep 17 00:00:00 2001 From: Thijs Sassen Date: Thu, 19 Mar 2020 09:19:53 +0100 Subject: [PATCH] Fixed compile errors for targets that do not support IPV6 Signed-off-by: Thijs Sassen --- src/core/ddsi/src/ddsi_eth.c | 1 + src/core/ddsi/src/ddsi_tcp.c | 2 ++ src/core/ddsi/src/ddsi_udp.c | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/core/ddsi/src/ddsi_eth.c b/src/core/ddsi/src/ddsi_eth.c index 670667d..a36d314 100644 --- a/src/core/ddsi/src/ddsi_eth.c +++ b/src/core/ddsi/src/ddsi_eth.c @@ -16,6 +16,7 @@ int ddsi_eth_enumerate_interfaces (ddsi_tran_factory_t fact, enum transport_sele int afs[] = { AF_INET, DDSRT_AF_TERM }; (void)fact; + (void)transport_selector; #if DDSRT_HAVE_IPV6 if (transport_selector == TRANS_TCP6 || diff --git a/src/core/ddsi/src/ddsi_tcp.c b/src/core/ddsi/src/ddsi_tcp.c index de7a7e6..e6544e2 100644 --- a/src/core/ddsi/src/ddsi_tcp.c +++ b/src/core/ddsi/src/ddsi_tcp.c @@ -42,7 +42,9 @@ union addr { struct sockaddr a; struct sockaddr_in a4; +#if DDSRT_HAVE_IPV6 struct sockaddr_in6 a6; +#endif }; typedef struct ddsi_tcp_conn { diff --git a/src/core/ddsi/src/ddsi_udp.c b/src/core/ddsi/src/ddsi_udp.c index 3410510..9f4e509 100644 --- a/src/core/ddsi/src/ddsi_udp.c +++ b/src/core/ddsi/src/ddsi_udp.c @@ -30,7 +30,9 @@ union addr { struct sockaddr_storage x; struct sockaddr a; struct sockaddr_in a4; +#if DDSRT_HAVE_IPV6 struct sockaddr_in6 a6; +#endif }; typedef struct ddsi_udp_conn {