mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
stream-ssl: Add support for Windows platform.
This commit creates events and through poll_fd_wait_event() associates them with socket file descriptors to get woken up from poll_block(). Some other changes: * Windows does not have sys/fcntl.h but has a fcntl.h On Linux, there is fctnl.h too. * include <openssl/applink.c> to handle different C-Runtime linking of OVS and openssl libraries as suggested at https://www.openssl.org/support/faq.html#PROG2 The above include will not be needed if we compile Open vSwitch with /MD compiler option. * SHUT_RDWR is equivalent to SD_BOTH on Windows. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -88,4 +88,15 @@ char *ss_format_address(const struct sockaddr_storage *,
|
||||
size_t ss_length(const struct sockaddr_storage *);
|
||||
const char *sock_strerror(int error);
|
||||
|
||||
#ifdef _WIN32
|
||||
/* Windows defines the 'optval' argument as char * instead of void *. */
|
||||
#define setsockopt(sock, level, optname, optval, optlen) \
|
||||
rpl_setsockopt(sock, level, optname, optval, optlen)
|
||||
static inline int rpl_setsockopt(int sock, int level, int optname,
|
||||
const void *optval, socklen_t optlen)
|
||||
{
|
||||
return (setsockopt)(sock, level, optname, optval, optlen);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* socket-util.h */
|
||||
|
Reference in New Issue
Block a user