]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
This should really be sa_family_t.
authorRoy Marples <roy@marples.name>
Fri, 24 Apr 2020 11:23:05 +0000 (12:23 +0100)
committerRoy Marples <roy@marples.name>
Fri, 24 Apr 2020 11:23:05 +0000 (12:23 +0100)
src/control.c
src/control.h
src/dhcpcd.c

index 744a4a1c912a538fefc92d4dd272e12b6e4c9639..f41fce1518f53c0582b82df583ac94f719da2740 100644 (file)
@@ -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;
index 0403f0cff5cdf5ea7a1ca4b721f34bb7548655b1..a702af2f1cc66022ccf2953bf827016d62a49de1 100644 (file)
@@ -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);
 
index 06e94961fb63f0408d81ff8f9eeb5199fe17a52b..ceed175927ba164321541a0e3587e758f359fa46 100644 (file)
@@ -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;