summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSander Roobol <sander@php.net>2002-07-13 09:26:36 +0000
committerSander Roobol <sander@php.net>2002-07-13 09:26:36 +0000
commit99b495b25d3a2b3a0b5efe79ba14d2fc6860fcfb (patch)
treed4e09c07281d75f90c931c62323c97a28c08ef50 /ext
parent7892e41645b69b90079b22172975794a5b6bbe82 (diff)
downloadphp-git-99b495b25d3a2b3a0b5efe79ba14d2fc6860fcfb.tar.gz
Fixed win32 build
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/fsock.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c
index 0f8646fb28..2b1f1ee20a 100644
--- a/ext/standard/fsock.c
+++ b/ext/standard/fsock.c
@@ -127,6 +127,9 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent)
struct timeval tv;
char *hashkey = NULL;
php_stream *stream = NULL;
+#ifdef PHP_WIN32
+ int err;
+#endif
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lzzd", &host, &host_len, &port, &zerrno, &zerrstr, &timeout) == FAILURE) {
RETURN_FALSE;
@@ -194,12 +197,8 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent)
stream = php_stream_sock_open_host(host, (unsigned short)port, socktype, (int)timeout, persistent);
#ifdef PHP_WIN32
- {
- int err;
-
- /* Preserve error */
- err = WSAGetLastError();
- }
+ /* Preserve error */
+ err = WSAGetLastError();
#endif
if (stream == NULL) {