changeset 5383:5f88487cbf65 draft

Linux: fix a compile warning for older compilers
author Roy Marples <roy@marples.name>
date Mon, 22 Jun 2020 13:18:26 +0100
parents 294dba04aa07
children 6d1812f4a3ac
files src/if-linux.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/if-linux.c	Mon Jun 22 13:17:25 2020 +0100
+++ b/src/if-linux.c	Mon Jun 22 13:18:26 2020 +0100
@@ -1598,9 +1598,11 @@
 		struct sockaddr_ll sll;
 		struct sockaddr_storage ss;
 	} su = {
-		.sll.sll_family = PF_PACKET,
-		.sll.sll_protocol = htons(ETH_P_ALL),
-		.sll.sll_ifindex = (int)ifp->index,
+		.sll = {
+			.sll_family = PF_PACKET,
+			.sll_protocol = htons(ETH_P_ALL),
+			.sll_ifindex = (int)ifp->index,
+		}
 	};
 #ifdef PACKET_AUXDATA
 	int n;