X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=compat%2Fmingw.h;h=51993ef114b4743267fc7b922dcae68345d2fd0a;hb=f81be17e1c4752c71815c26f5266604c2b7756b7;hp=26c402733e1171179424b8188235c1b82be25ca8;hpb=b1b952043f8f909649fdf053c371109c84f9cf56;p=git.git diff --git a/compat/mingw.h b/compat/mingw.h index 26c402733..51993ef11 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -124,6 +124,27 @@ static inline int waitpid(pid_t pid, int *status, unsigned options) return -1; } +#ifndef NO_OPENSSL +#include +static inline int mingw_SSL_set_fd(SSL *ssl, int fd) +{ + return SSL_set_fd(ssl, _get_osfhandle(fd)); +} +#define SSL_set_fd mingw_SSL_set_fd + +static inline int mingw_SSL_set_rfd(SSL *ssl, int fd) +{ + return SSL_set_rfd(ssl, _get_osfhandle(fd)); +} +#define SSL_set_rfd mingw_SSL_set_rfd + +static inline int mingw_SSL_set_wfd(SSL *ssl, int fd) +{ + return SSL_set_wfd(ssl, _get_osfhandle(fd)); +} +#define SSL_set_wfd mingw_SSL_set_wfd +#endif + /* * implementations of missing functions */