From: Roy Marples Date: Wed, 6 Jan 2016 12:59:38 +0000 (+0000) Subject: Fix compile on Linux X-Git-Tag: v6.10.0~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0409599e84a0ed62c06ab0993daf9e9d2a69d347;p=thirdparty%2Fdhcpcd.git Fix compile on Linux --- diff --git a/if-linux.c b/if-linux.c index 05144908..874bea95 100644 --- a/if-linux.c +++ b/if-linux.c @@ -884,10 +884,12 @@ send_netlink(struct dhcpcd_ctx *ctx, struct interface *ifp, msg.msg_iovlen = 1; /* Request a reply */ hdr->nlmsg_flags |= NLM_F_ACK; - hdr->nlmsg_seq = ++ctx->seq; + hdr->nlmsg_seq = (uint32_t)++ctx->seq; + if ((unsigned int)ctx->seq > UINT32_MAX) + ctx->seq = 0; if (sendmsg(s, &msg, 0) != -1) { - ctx->sseq = ctx-seq; + ctx->sseq = ctx->seq; r = get_netlink(ctx, ifp, s, 0, callback); } else r = -1;