- Cast sun_len sizeof to socklen_t.

git-svn-id: file:///svn/unbound/trunk@3312 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards
2015-01-12 08:20:43 +00:00
parent d978957ad9
commit f890257321
3 changed files with 5 additions and 2 deletions
+3
View File
@@ -1,3 +1,6 @@
12 January 2015: Wouter
- Cast sun_len sizeof to socklen_t.
7 January 2015: Wouter
- Fix warnings in pythonmod changes.
+1 -1
View File
@@ -602,7 +602,7 @@ create_local_accept_sock(const char *path, int* noproto)
#ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
/* this member exists on BSDs, not Linux */
sun.sun_len = (sa_family_t)sizeof(sun);
sun.sun_len = (socklen_t)sizeof(sun);
#endif
sun.sun_family = AF_LOCAL;
/* length is 92-108, 104 on FreeBSD */
+1 -1
View File
@@ -207,7 +207,7 @@ contact_server(const char* svr, struct config_file* cfg, int statuscmd)
struct sockaddr_un* sun = (struct sockaddr_un *) &addr;
sun->sun_family = AF_LOCAL;
#ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
sun->sun_len = (sa_family_t)sizeof(sun);
sun->sun_len = (socklen_t)sizeof(sun);
#endif
(void)strlcpy(sun->sun_path, svr, sizeof(sun->sun_path));
addrlen = (socklen_t)sizeof(struct sockaddr_un);