Module: wine Branch: master Commit: 9561ba33cdf92f68394693db00e692d27d95cd4c URL: https://source.winehq.org/git/wine.git/?a=commit;h=9561ba33cdf92f68394693db0...
Author: Alex Henrie alexhenrie24@gmail.com Date: Mon Sep 27 08:40:22 2021 -0600
ws2_32: Remove outer preprocessor checks from control message functions.
The checks were ugly and unnecessary. Furthermore, these functions are used for both IPv4 and IPv6 options, and it's conceivable that a system could be stripped down to only provide IPv6 support and not IPv4 support.
Signed-off-by: Alex Henrie alexhenrie24@gmail.com Signed-off-by: Zebediah Figura zfigura@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/unix/socket.c | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c index 75c54295c20..2be4f2b52a3 100644 --- a/dlls/ntdll/unix/socket.c +++ b/dlls/ntdll/unix/socket.c @@ -369,7 +369,6 @@ static int sockaddr_from_unix( const union unix_sockaddr *uaddr, struct WS_socka }
#ifndef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS -#if defined(IP_PKTINFO) || defined(IP_RECVDSTADDR) static WSACMSGHDR *fill_control_message( int level, int type, WSACMSGHDR *current, ULONG *maxsize, void *data, int len ) { ULONG msgsize = sizeof(WSACMSGHDR) + WSA_CMSG_ALIGN(len); @@ -384,11 +383,9 @@ static WSACMSGHDR *fill_control_message( int level, int type, WSACMSGHDR *curren memcpy(ptr, data, len); return (WSACMSGHDR *)(ptr + WSA_CMSG_ALIGN(len)); } -#endif /* defined(IP_PKTINFO) || defined(IP_RECVDSTADDR) */
static int convert_control_headers(struct msghdr *hdr, WSABUF *control) { -#if defined(IP_PKTINFO) || defined(IP_RECVDSTADDR) WSACMSGHDR *cmsg_win = (WSACMSGHDR *)control->buf, *ptr; ULONG ctlsize = control->len; struct cmsghdr *cmsg_unix; @@ -490,10 +487,6 @@ static int convert_control_headers(struct msghdr *hdr, WSABUF *control) error: control->len = 0; return 0; -#else /* defined(IP_PKTINFO) || defined(IP_RECVDSTADDR) */ - control->len = 0; - return 1; -#endif /* defined(IP_PKTINFO) || defined(IP_RECVDSTADDR) */ } #endif /* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */