diff options
| author | Roy Marples <roy@marples.name> | 2015-09-12 13:14:27 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2015-09-12 13:14:27 +0000 |
| commit | 5cd73faeab6fb6533b2eb0dfdabf996e9d2da348 (patch) | |
| tree | 2c9e9c85796e9b3b3793537de9b93e39486f39c4 /if.c | |
| parent | f800a7692af9446e039e935f44d6c0f48ede6e90 (diff) | |
| download | dhcpcd-5cd73faeab6fb6533b2eb0dfdabf996e9d2da348.tar.xz | |
Fix compile on Bitrig
Diffstat (limited to 'if.c')
| -rw-r--r-- | if.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -520,7 +520,7 @@ if_discover(struct dhcpcd_ctx *ctx, int argc, char * const *argv) memset(&ifr, 0, sizeof(ifr)); strlcpy(ifr.ifr_name, ifp->name, sizeof(ifr.ifr_name)); if (ioctl(ctx->pf_inet_fd, SIOCGIFPRIORITY, &ifr) == 0) - ifp->metric = ifr.ifr_metric; + ifp->metric = (unsigned int)ifr.ifr_metric; #else /* We reserve the 100 range for virtual interfaces, if and when * we can work them out. */ @@ -675,11 +675,11 @@ xsocket(int domain, int type, int protocol, int flags) if ((s = socket(domain, type, protocol)) == -1) return -1; - if ((flags & O_CLOEXEC) && (xflags = fcntl(s, F_GETFD, 0)) == -1 || - fcntl(s, F_SETFD, xflags | FD_CLOEXEC) == -1) + if ((flags & O_CLOEXEC) && ((xflags = fcntl(s, F_GETFD, 0)) == -1 || + fcntl(s, F_SETFD, xflags | FD_CLOEXEC) == -1)) goto out; - if ((flags & O_NONBLOCK) && (xflags = fcntl(s, F_GETFL, 0)) == -1 || - fcntl(s, F_SETFL, xflags | O_NONBLOCK) == -1) + if ((flags & O_NONBLOCK) && ((xflags = fcntl(s, F_GETFL, 0)) == -1 || + fcntl(s, F_SETFL, xflags | O_NONBLOCK) == -1)) goto out; return s; out: |
