MFB51 Fix build on win32
authorFrank M. Kromann <fmk@php.net>
Sat, 4 Feb 2006 23:58:22 +0000 (23:58 +0000)
committerFrank M. Kromann <fmk@php.net>
Sat, 4 Feb 2006 23:58:22 +0000 (23:58 +0000)
sapi/cgi/fastcgi.c

index d6165923914d0e0f476d426b6f0779655647cb54..5051898c10ca11dfe212a18847b4f491c75c1f0e 100644 (file)
@@ -623,6 +623,10 @@ static inline void fcgi_close(fcgi_request *req, int force, int destroy)
 
 int fcgi_accept_request(fcgi_request *req)
 {
+#ifdef _WIN32
+       HANDLE pipe;
+       OVERLAPPED ov;
+#endif
        fcgi_finish_request(req);
 
        while (1) {
@@ -632,8 +636,7 @@ int fcgi_accept_request(fcgi_request *req)
                                        return -1;
                                }
 #ifdef _WIN32
-                               HANDLE pipe = (HANDLE)_get_osfhandle(req->listen_socket);
-                               OVERLAPPED ov;
+                               pipe = (HANDLE)_get_osfhandle(req->listen_socket);
 
                                FCGI_LOCK(req->listen_socket);
                                ov.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);