mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Calculate length of AF_UNIX addr struct portably in getsockaddrarg().
This commit is contained in:
parent
53a9bf8164
commit
65af28a0f4
1 changed files with 1 additions and 1 deletions
|
@ -373,7 +373,7 @@ getsockaddrarg,PySocketSockObject *,s, PyObject *,args, struct sockaddr **,addr_
|
|||
memcpy(addr->sun_path, path, len);
|
||||
addr->sun_path[len] = 0;
|
||||
*addr_ret = (struct sockaddr *) addr;
|
||||
*len_ret = len + sizeof addr->sun_family;
|
||||
*len_ret = len + sizeof(*addr) - sizeof(addr->sun_path);
|
||||
return 1;
|
||||
}
|
||||
#endif /* AF_UNIX */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue