]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
64-bit clang fallout
authorRoy Marples <roy@marples.name>
Thu, 27 Mar 2014 23:15:14 +0000 (23:15 +0000)
committerRoy Marples <roy@marples.name>
Thu, 27 Mar 2014 23:15:14 +0000 (23:15 +0000)
common.c
dhcp6.c
eloop.c

index e8548dd81b9c948a0e7dc7503f1d2c35d180aa3f..a4a6a8bbd2843db58c41c079861bbe6ecdc35c44 100644 (file)
--- 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 aa8391df10d32d990adc3ccb92d8f057f961b415..9c5b2123cbc17c32f020b48b58df6067404d6f6b 100644 (file)
--- 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 3554b8c9e1be6c11c650af64fbf4de4f8ebd7ee7..ce632d7ad655d520fb438ed3431cdfe07205d9ee 100644 (file)
--- 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;