]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix for new splint on FreeBSD. Fix cast for sockaddr_un.sun_len.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 13 Sep 2016 11:35:33 +0000 (11:35 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 13 Sep 2016 11:35:33 +0000 (11:35 +0000)
git-svn-id: file:///svn/unbound/trunk@3854 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
services/listen_dnsport.c
smallapp/unbound-control.c

index b818283342c53221196fa8affc3a59d8c2009c16..f6abd9e7764716b2446e702c5acd30261d7cad69 100644 (file)
@@ -1,6 +1,7 @@
 13 September 2016: Wouter
        - Silenced flex-generated sign-unsigned warning print with gcc
          diagnostic pragma.
+       - Fix for new splint on FreeBSD.  Fix cast for sockaddr_un.sun_len.
 
 9 September 2016: Wouter
        - Fix #831: workaround for spurious fread_chk warning against petal.c
index 88b8bdfab94006702233b6d7fef7a69a5ec3e609..929fee18b3e7d949d145c54cd0e29cb051294a76 100644 (file)
@@ -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 = (socklen_t)sizeof(usock);
+       usock.sun_len = (unsigned char)sizeof(usock);
 #endif
        usock.sun_family = AF_LOCAL;
        /* length is 92-108, 104 on FreeBSD */
index e054da3cf33ea3e5ea9d021d0f43a62845238533..a5b71be358dabe3eb524a1aa0a42dde2335bdb7c 100644 (file)
@@ -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 = (socklen_t)sizeof(usock);
+               usock->sun_len = (unsigned char)sizeof(usock);
 #endif
                (void)strlcpy(usock->sun_path, svr, sizeof(usock->sun_path));
                addrlen = (socklen_t)sizeof(struct sockaddr_un);