diff options
author | marha <marha@users.sourceforge.net> | 2011-09-30 08:40:25 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-09-30 08:40:25 +0200 |
commit | 60adbfdea1ee754341d64454274e7aa83bae8971 (patch) | |
tree | 1b56329c88f1a881b0e7297bb4283cfbb7e39c97 /openssl/crypto/bio/b_sock.c | |
parent | af72dcd109d7610b96863035541250997c7a172e (diff) | |
download | vcxsrv-60adbfdea1ee754341d64454274e7aa83bae8971.tar.gz vcxsrv-60adbfdea1ee754341d64454274e7aa83bae8971.tar.bz2 vcxsrv-60adbfdea1ee754341d64454274e7aa83bae8971.zip |
Upgraded to openssl-1.0.0e
Diffstat (limited to 'openssl/crypto/bio/b_sock.c')
-rw-r--r-- | openssl/crypto/bio/b_sock.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/openssl/crypto/bio/b_sock.c b/openssl/crypto/bio/b_sock.c index 12b0a53a8..d47310d65 100644 --- a/openssl/crypto/bio/b_sock.c +++ b/openssl/crypto/bio/b_sock.c @@ -551,7 +551,30 @@ int BIO_socket_ioctl(int fd, long type, void *arg) #ifdef __DJGPP__ i=ioctlsocket(fd,type,(char *)arg); #else - i=ioctlsocket(fd,type,arg); +# if defined(OPENSSL_SYS_VMS) + /* 2011-02-18 SMS. + * VMS ioctl() can't tolerate a 64-bit "void *arg", but we + * observe that all the consumers pass in an "unsigned long *", + * so we arrange a local copy with a short pointer, and use + * that, instead. + */ +# if __INITIAL_POINTER_SIZE == 64 +# define ARG arg_32p +# pragma pointer_size save +# pragma pointer_size 32 + unsigned long arg_32; + unsigned long *arg_32p; +# pragma pointer_size restore + arg_32p = &arg_32; + arg_32 = *((unsigned long *) arg); +# else /* __INITIAL_POINTER_SIZE == 64 */ +# define ARG arg +# endif /* __INITIAL_POINTER_SIZE == 64 [else] */ +# else /* defined(OPENSSL_SYS_VMS) */ +# define ARG arg +# endif /* defined(OPENSSL_SYS_VMS) [else] */ + + i=ioctlsocket(fd,type,ARG); #endif /* __DJGPP__ */ if (i < 0) SYSerr(SYS_F_IOCTLSOCKET,get_last_socket_error()); @@ -660,6 +683,7 @@ int BIO_get_accept_socket(char *host, int bind_mode) * note that commonly IPv6 wildchard socket can service * IPv4 connections just as well... */ memset(&hint,0,sizeof(hint)); + hint.ai_flags = AI_PASSIVE; if (h) { if (strchr(h,':')) @@ -672,7 +696,10 @@ int BIO_get_accept_socket(char *host, int bind_mode) #endif } else if (h[0]=='*' && h[1]=='\0') + { + hint.ai_family = AF_INET; h=NULL; + } } if ((*p_getaddrinfo.f)(h,p,&hint,&res)) break; |