diff options
Diffstat (limited to 'src/lib/libcrypto/bio/b_sock.c')
-rw-r--r-- | src/lib/libcrypto/bio/b_sock.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/lib/libcrypto/bio/b_sock.c b/src/lib/libcrypto/bio/b_sock.c index 43b27e0406..b43cb713a7 100644 --- a/src/lib/libcrypto/bio/b_sock.c +++ b/src/lib/libcrypto/bio/b_sock.c | |||
@@ -81,21 +81,6 @@ | |||
81 | #define MAX_LISTEN 32 | 81 | #define MAX_LISTEN 32 |
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | #if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)) | ||
85 | static int wsa_init_done = 0; | ||
86 | #endif | ||
87 | |||
88 | /* | ||
89 | * WSAAPI specifier is required to make indirect calls to run-time | ||
90 | * linked WinSock 2 functions used in this module, to be specific | ||
91 | * [get|free]addrinfo and getnameinfo. This is because WinSock uses | ||
92 | * uses non-C calling convention, __stdcall vs. __cdecl, on x86 | ||
93 | * Windows. On non-WinSock platforms WSAAPI needs to be void. | ||
94 | */ | ||
95 | #ifndef WSAAPI | ||
96 | #define WSAAPI | ||
97 | #endif | ||
98 | |||
99 | static int get_ip(const char *str, unsigned char *ip); | 84 | static int get_ip(const char *str, unsigned char *ip); |
100 | 85 | ||
101 | int | 86 | int |
@@ -324,13 +309,13 @@ BIO_get_accept_socket(char *host, int bind_mode) | |||
324 | do { | 309 | do { |
325 | static union { | 310 | static union { |
326 | void *p; | 311 | void *p; |
327 | int (WSAAPI *f)(const char *, const char *, | 312 | int (*f)(const char *, const char *, |
328 | const struct addrinfo *, | 313 | const struct addrinfo *, |
329 | struct addrinfo **); | 314 | struct addrinfo **); |
330 | } p_getaddrinfo = {NULL}; | 315 | } p_getaddrinfo = {NULL}; |
331 | static union { | 316 | static union { |
332 | void *p; | 317 | void *p; |
333 | void (WSAAPI *f)(struct addrinfo *); | 318 | void (*f)(struct addrinfo *); |
334 | } p_freeaddrinfo = {NULL}; | 319 | } p_freeaddrinfo = {NULL}; |
335 | struct addrinfo *res, hint; | 320 | struct addrinfo *res, hint; |
336 | 321 | ||
@@ -536,7 +521,7 @@ BIO_accept(int sock, char **addr) | |||
536 | size_t nl; | 521 | size_t nl; |
537 | static union { | 522 | static union { |
538 | void *p; | 523 | void *p; |
539 | int (WSAAPI *f)(const struct sockaddr *, | 524 | int (*f)(const struct sockaddr *, |
540 | size_t/*socklen_t*/, char *, size_t, | 525 | size_t/*socklen_t*/, char *, size_t, |
541 | char *, size_t, int); | 526 | char *, size_t, int); |
542 | } p_getnameinfo = {NULL}; | 527 | } p_getnameinfo = {NULL}; |