b_sock.c: make getsockopt work in cases when optlen is 64-bit value.
(cherry picked from commit 80c42f3e0c34451dd7cfc65e07bc639759ef07d2)
This commit is contained in:
parent
1121ba1b74
commit
d451ece4e7
@ -233,13 +233,14 @@ int BIO_get_port(const char *str, unsigned short *port_ptr)
|
|||||||
int BIO_sock_error(int sock)
|
int BIO_sock_error(int sock)
|
||||||
{
|
{
|
||||||
int j,i;
|
int j,i;
|
||||||
int size;
|
union { size_t s; int i; } size;
|
||||||
|
|
||||||
#if defined(OPENSSL_SYS_BEOS_R5)
|
#if defined(OPENSSL_SYS_BEOS_R5)
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
size=sizeof(int);
|
/* heuristic way to adapt for platforms that expect 64-bit optlen */
|
||||||
|
size.s=0, size.i=sizeof(j);
|
||||||
/* Note: under Windows the third parameter is of type (char *)
|
/* Note: under Windows the third parameter is of type (char *)
|
||||||
* whereas under other systems it is (void *) if you don't have
|
* whereas under other systems it is (void *) if you don't have
|
||||||
* a cast it will choke the compiler: if you do have a cast then
|
* a cast it will choke the compiler: if you do have a cast then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user