mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix for new splint on FreeBSD. Fix cast for sockaddr_un.sun_len.
git-svn-id: file:///svn/unbound/trunk@3854 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
d77901e8ed
commit
9d4eb4cac5
3 changed files with 3 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
13 September 2016: Wouter
|
13 September 2016: Wouter
|
||||||
- Silenced flex-generated sign-unsigned warning print with gcc
|
- Silenced flex-generated sign-unsigned warning print with gcc
|
||||||
diagnostic pragma.
|
diagnostic pragma.
|
||||||
|
- Fix for new splint on FreeBSD. Fix cast for sockaddr_un.sun_len.
|
||||||
|
|
||||||
9 September 2016: Wouter
|
9 September 2016: Wouter
|
||||||
- Fix #831: workaround for spurious fread_chk warning against petal.c
|
- Fix #831: workaround for spurious fread_chk warning against petal.c
|
||||||
|
|
|
||||||
|
|
@ -704,7 +704,7 @@ create_local_accept_sock(const char *path, int* noproto)
|
||||||
verbose(VERB_ALGO, "creating unix socket %s", path);
|
verbose(VERB_ALGO, "creating unix socket %s", path);
|
||||||
#ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
|
#ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
|
||||||
/* this member exists on BSDs, not Linux */
|
/* this member exists on BSDs, not Linux */
|
||||||
usock.sun_len = (socklen_t)sizeof(usock);
|
usock.sun_len = (unsigned char)sizeof(usock);
|
||||||
#endif
|
#endif
|
||||||
usock.sun_family = AF_LOCAL;
|
usock.sun_family = AF_LOCAL;
|
||||||
/* length is 92-108, 104 on FreeBSD */
|
/* length is 92-108, 104 on FreeBSD */
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ contact_server(const char* svr, struct config_file* cfg, int statuscmd)
|
||||||
struct sockaddr_un* usock = (struct sockaddr_un *) &addr;
|
struct sockaddr_un* usock = (struct sockaddr_un *) &addr;
|
||||||
usock->sun_family = AF_LOCAL;
|
usock->sun_family = AF_LOCAL;
|
||||||
#ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
|
#ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
|
||||||
usock->sun_len = (socklen_t)sizeof(usock);
|
usock->sun_len = (unsigned char)sizeof(usock);
|
||||||
#endif
|
#endif
|
||||||
(void)strlcpy(usock->sun_path, svr, sizeof(usock->sun_path));
|
(void)strlcpy(usock->sun_path, svr, sizeof(usock->sun_path));
|
||||||
addrlen = (socklen_t)sizeof(struct sockaddr_un);
|
addrlen = (socklen_t)sizeof(struct sockaddr_un);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue