]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Linux: fix a compile warning for older compilers
authorRoy Marples <roy@marples.name>
Mon, 22 Jun 2020 12:18:26 +0000 (13:18 +0100)
committerRoy Marples <roy@marples.name>
Mon, 22 Jun 2020 12:18:26 +0000 (13:18 +0100)
src/if-linux.c

index b51878d7f94b58c4fe3f4e8a09cc9e3c3d5de62d..c9e02503d53f1b7e6b7d031c1abbf26b18621ccf 100644 (file)
@@ -1598,9 +1598,11 @@ bpf_open(const struct interface *ifp,
                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;