From: Roy Marples Date: Wed, 27 May 2020 15:53:21 +0000 (+0000) Subject: Appease older compilers X-Git-Tag: v9.1.0~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db18c1c61c41c3100627f3766f169c7739c37836;p=thirdparty%2Fdhcpcd.git Appease older compilers --- diff --git a/src/dhcp.c b/src/dhcp.c index 744e6954..a7f60205 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -3375,9 +3375,11 @@ checksums_valid(void *packet, struct ip ip; uint16_t w[sizeof(struct ip) / 2]; } pip = { - .ip.ip_p = IPPROTO_UDP, - .ip.ip_src = ip->ip_src, - .ip.ip_dst = ip->ip_dst, + .ip = { + .ip_p = IPPROTO_UDP, + .ip_src = ip->ip_src, + .ip_dst = ip->ip_dst, + } }; size_t ip_hlen; struct udphdr udp; diff --git a/src/sa.c b/src/sa.c index 97e5e874..4d898b4e 100644 --- a/src/sa.c +++ b/src/sa.c @@ -288,7 +288,7 @@ sa_toprefix(const struct sockaddr *sa) #ifndef NDEBUG /* Ensure the calculation is correct */ if (!sa_inprefix) { - union sa_ss ss = { .sa.sa_family = sa->sa_family }; + union sa_ss ss = { .sa = { .sa_family = sa->sa_family } }; sa_inprefix = true; sa_fromprefix(&ss.sa, prefix);