Explorar o código

- fix: compile problems in io_watch_add if ser is compiled on linux with
NO_SIGIO=1 (patch from Ondrej Martinek <[email protected]>)

Andrei Pelinescu-Onciul %!s(int64=18) %!d(string=hai) anos
pai
achega
3665e5c1bb
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      io_wait.h

+ 3 - 2
io_wait.h

@@ -329,8 +329,10 @@ inline static int io_watch_add(	io_wait_h* h,
 #ifdef HAVE_DEVPOLL
 	struct pollfd pfd;
 #endif
-#if defined(HAVE_SIGIO_RT)
+#if defined(HAVE_SIGIO_RT) || defined (HAVE_EPOLL)
 	int n;
+#endif
+#if defined(HAVE_SIGIO_RT)
 	int idx;
 	int check_io;
 	struct pollfd pf;
@@ -464,7 +466,6 @@ again2:
 					strerror(errno), errno);
 				goto error;
 			}
-			idx=-1;
 			break;
 #endif
 #ifdef HAVE_KQUEUE