From: Roy Marples Date: Fri, 24 Apr 2020 11:23:05 +0000 (+0100) Subject: This should really be sa_family_t. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d62cfeae018b7bec80234d8868317527945d4fa1;p=thirdparty%2Fdhcpcd.git This should really be sa_family_t. --- diff --git a/src/control.c b/src/control.c index 744a4a1c..f41fce15 100644 --- a/src/control.c +++ b/src/control.c @@ -193,7 +193,7 @@ control_handle_unpriv(void *arg) } static int -make_sock(struct sockaddr_un *sa, const char *ifname, uint16_t family, +make_sock(struct sockaddr_un *sa, const char *ifname, sa_family_t family, bool unpriv) { int fd; @@ -230,7 +230,7 @@ make_sock(struct sockaddr_un *sa, const char *ifname, uint16_t family, #define S_UNPRIV (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) static int -control_start1(struct dhcpcd_ctx *ctx, const char *ifname, uint16_t family, +control_start1(struct dhcpcd_ctx *ctx, const char *ifname, sa_family_t family, mode_t fmode) { struct sockaddr_un sa; @@ -261,7 +261,7 @@ control_start1(struct dhcpcd_ctx *ctx, const char *ifname, uint16_t family, } int -control_start(struct dhcpcd_ctx *ctx, const char *ifname, uint16_t family) +control_start(struct dhcpcd_ctx *ctx, const char *ifname, sa_family_t family) { int fd; @@ -337,7 +337,7 @@ control_stop(struct dhcpcd_ctx *ctx) } int -control_open(const char *ifname, uint16_t family, bool unpriv) +control_open(const char *ifname, sa_family_t family, bool unpriv) { struct sockaddr_un sa; int fd; diff --git a/src/control.h b/src/control.h index 0403f0cf..a702af2f 100644 --- a/src/control.h +++ b/src/control.h @@ -66,9 +66,9 @@ TAILQ_HEAD(fd_list_head, fd_list); #define FD_LISTEN (1<<0) #define FD_UNPRIV (1<<1) -int control_start(struct dhcpcd_ctx *, const char *, uint16_t); +int control_start(struct dhcpcd_ctx *, const char *, sa_family_t); int control_stop(struct dhcpcd_ctx *); -int control_open(const char *, uint16_t, bool); +int control_open(const char *, sa_family_t, bool); ssize_t control_send(struct dhcpcd_ctx *, int, char * const *); int control_queue(struct fd_list *, void *, size_t, bool); diff --git a/src/dhcpcd.c b/src/dhcpcd.c index 06e94961..ceed1759 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -1751,7 +1751,7 @@ main(int argc, char **argv) struct ifaddrs *ifaddrs = NULL; struct if_options *ifo; struct interface *ifp; - uint16_t family = AF_UNSPEC; + sa_family_t family = AF_UNSPEC; int opt, oi = 0, i; unsigned int logopts, t; ssize_t len;