Browse code

fixes to compile on Mac OS X

Nils Ohlmeier authored on 05/12/2007 23:13:03
Showing 1 changed files
... ...
@@ -87,6 +87,8 @@
87 87
 #include "pt.h" /* mypid() */
88 88
 #endif
89 89
 
90
+#include "compiler_opt.h"
91
+
90 92
 
91 93
 extern int _os_ver; /* os version number, needed to select bugs workarrounds */
92 94
 
... ...
@@ -434,7 +436,7 @@ again2:
434 434
 #endif
435 435
 #ifdef HAVE_KQUEUE
436 436
 		case POLL_KQUEUE:
437
-			if (likely( events & POLLINT)){
437
+			if (likely( events & POLLIN)){
438 438
 				if (unlikely(kq_ev_change(h, fd, EVFILT_READ, EV_ADD, e)==-1))
439 439
 				goto error;
440 440
 			}
... ...
@@ -999,6 +1001,7 @@ inline static int io_wait_loop_kqueue(io_wait_h* h, int t, int repeat)
999 999
 	int n, r;
1000 1000
 	struct timespec tspec;
1001 1001
 	struct fd_map* fm;
1002
+	int revents;
1002 1003
 	
1003 1004
 	tspec.tv_sec=t;
1004 1005
 	tspec.tv_nsec=0;
... ...
@@ -1044,7 +1047,7 @@ again:
1044 1044
 					while(fm->type && (fm->events & revents) && 
1045 1045
 							(handle_io(fm, revents, -1)>0) && repeat);
1046 1046
 				}
1047
-			}
1047
+			//}
1048 1048
 		}
1049 1049
 error:
1050 1050
 	return n;