From 9ff171602958c614d14547b6be71e5b5d34866bb Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Tue, 29 Oct 2013 10:48:09 +0100 Subject: [PATCH] windows: Don't use function macros to overload send/recv() and friends While the macro versions would not catch non-function invocations, we actually have to use catch all to support the sender_t.send() function. --- src/libstrongswan/utils/windows.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libstrongswan/utils/windows.h b/src/libstrongswan/utils/windows.h index 4e1e6b6c26..d57b5dc1d3 100644 --- a/src/libstrongswan/utils/windows.h +++ b/src/libstrongswan/utils/windows.h @@ -267,26 +267,26 @@ int socketpair(int domain, int type, int protocol, int sv[2]); /** * recv(2) with support for MSG_DONTWAIT */ -#define recv(...) windows_recv(__VA_ARGS__) +#define recv windows_recv ssize_t windows_recv(int sockfd, void *buf, size_t len, int flags); /** * recvfrom(2) with support for MSG_DONTWAIT */ -#define recvfrom(...) windows_recvfrom(__VA_ARGS__) +#define recvfrom windows_recvfrom ssize_t windows_recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen); /** * recvfrom(2) with support for MSG_DONTWAIT */ -#define send(...) windows_send(__VA_ARGS__) +#define send windows_send ssize_t windows_send(int sockfd, const void *buf, size_t len, int flags); /** * recvfrom(2) with support for MSG_DONTWAIT */ -#define sendto(...) windows_send(__VA_ARGS__) +#define sendto windows_send ssize_t windows_sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen); -- 2.47.2