diff --git a/services/listen_dnsport.c b/services/listen_dnsport.c index 929fee18b..6637483b9 100644 --- a/services/listen_dnsport.c +++ b/services/listen_dnsport.c @@ -704,7 +704,7 @@ create_local_accept_sock(const char *path, int* noproto) verbose(VERB_ALGO, "creating unix socket %s", path); #ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN /* this member exists on BSDs, not Linux */ - usock.sun_len = (unsigned char)sizeof(usock); + usock.sun_len = (unsigned)sizeof(usock); #endif usock.sun_family = AF_LOCAL; /* length is 92-108, 104 on FreeBSD */ diff --git a/smallapp/unbound-control.c b/smallapp/unbound-control.c index a5b71be35..ffaf5e04d 100644 --- a/smallapp/unbound-control.c +++ b/smallapp/unbound-control.c @@ -212,7 +212,7 @@ contact_server(const char* svr, struct config_file* cfg, int statuscmd) struct sockaddr_un* usock = (struct sockaddr_un *) &addr; usock->sun_family = AF_LOCAL; #ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN - usock->sun_len = (unsigned char)sizeof(usock); + usock->sun_len = (unsigned)sizeof(usock); #endif (void)strlcpy(usock->sun_path, svr, sizeof(usock->sun_path)); addrlen = (socklen_t)sizeof(struct sockaddr_un);