summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-04-24 12:23:05 +0100
committerRoy Marples <roy@marples.name>2020-04-24 12:23:05 +0100
commitd62cfeae018b7bec80234d8868317527945d4fa1 (patch)
treed319dcc468173986351b3dac75f6741ff483f717 /src
parentf10b3ded87b73e0d2e1018781ca874aea166eac0 (diff)
downloaddhcpcd-d62cfeae018b7bec80234d8868317527945d4fa1.tar.xz
This should really be sa_family_t.
Diffstat (limited to 'src')
-rw-r--r--src/control.c8
-rw-r--r--src/control.h4
-rw-r--r--src/dhcpcd.c2
3 files changed, 7 insertions, 7 deletions
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;