mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
bpo-38282: Rewrite getsockaddrarg() helper function (GH-16698)
Rewrite getsockaddrarg() helper function of socketmodule.c (_socket module) to prevent a false alarm when compiling codde using GCC with _FORTIFY_SOURCE=2. Pass a pointer of the sock_addr_t union, rather than passing a pointer to a sockaddr structure. Add "struct sockaddr_tipc tipc;" to the sock_addr_t union.
This commit is contained in:
parent
1dbe537385
commit
d565fb9828
2 changed files with 25 additions and 39 deletions
|
@ -261,6 +261,9 @@ typedef union sock_addr {
|
|||
#ifdef AF_VSOCK
|
||||
struct sockaddr_vm vm;
|
||||
#endif
|
||||
#ifdef HAVE_LINUX_TIPC_H
|
||||
struct sockaddr_tipc tipc;
|
||||
#endif
|
||||
} sock_addr_t;
|
||||
|
||||
/* The object holding a socket. It holds some extra information,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue