]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #32979 (OpenSSL stream->fd casts broken in 64-bit build)
authorJoe Orton <jorton@php.net>
Fri, 4 Apr 2008 13:02:48 +0000 (13:02 +0000)
committerJoe Orton <jorton@php.net>
Fri, 4 Apr 2008 13:02:48 +0000 (13:02 +0000)
   (stotty at tvnet dot hu)
MFH: Fix another case of a broken stream->fd cast in 64-bit builds.

ext/openssl/xp_ssl.c
ext/soap/php_http.c

index 74752936f7f50fb00031a1f29587d2aad5331bfa..ef109d5c6557fe6f230b9e597e403581981e193b 100644 (file)
@@ -728,7 +728,7 @@ static int php_openssl_sockop_cast(php_stream *stream, int castas, void **ret TS
 
                case PHP_STREAM_AS_FD_FOR_SELECT:
                        if (ret) {
-                               *ret = (void*)sslsock->s.socket;
+                               *(int *)ret = sslsock->s.socket;
                        }
                        return SUCCESS;
 
@@ -738,7 +738,7 @@ static int php_openssl_sockop_cast(php_stream *stream, int castas, void **ret TS
                                return FAILURE;
                        }
                        if (ret) {
-                               *ret = (void*)sslsock->s.socket;
+                               *(int *)ret = sslsock->s.socket;
                        }
                        return SUCCESS;
                default:
index 2df048256380afd6e6d352bb91cc5f69ec7592ab..717a85d9803cbfe110670939dcd37f34a6fc7816 100644 (file)
@@ -33,7 +33,7 @@ static int get_http_headers(php_stream *socketd,char **response, int *out_size T
 
 static int stream_alive(php_stream *stream  TSRMLS_DC)
 {
-       long socket;
+       int socket;
        char buf;
 
        /* maybe better to use: