From: Roy Marples Date: Thu, 27 Mar 2014 23:15:14 +0000 (+0000) Subject: 64-bit clang fallout X-Git-Tag: v6.4.0~122 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f751cdf6d31f1f95895128d0f679f819b1074bc2;p=thirdparty%2Fdhcpcd.git 64-bit clang fallout --- diff --git a/common.c b/common.c index e8548dd8..a4a6a8bb 100644 --- a/common.c +++ b/common.c @@ -97,7 +97,7 @@ get_monotonic(struct timeval *tp) if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) { tp->tv_sec = ts.tv_sec; - tp->tv_usec = ts.tv_nsec / 1000; + tp->tv_usec = (suseconds_t)(ts.tv_nsec / 1000); return 0; } #elif defined(__APPLE__) diff --git a/dhcp6.c b/dhcp6.c index aa8391df..9c5b2123 100644 --- a/dhcp6.c +++ b/dhcp6.c @@ -1625,7 +1625,7 @@ dhcp6_readlease(struct interface *ifp) } syslog(LOG_DEBUG, "%s: reading lease `%s'", ifp->name, state->leasefile); - if (st.st_size > SIZE_MAX) { + if (st.st_size > UINT32_MAX) { syslog(LOG_ERR, "%s: file too big", ifp->name); return -1; } diff --git a/eloop.c b/eloop.c index 3554b8c9..ce632d7a 100644 --- a/eloop.c +++ b/eloop.c @@ -371,7 +371,8 @@ eloop_start(struct dhcpcd_ctx *dctx) } #ifdef USE_SIGNALS - n = pollts(ctx->fds, ctx->events_len, tsp, &dctx->sigset); + n = pollts(ctx->fds, (nfds_t)ctx->events_len, + tsp, &dctx->sigset); #else if (tsp == NULL) timeout = -1;