Forráskód Böngészése

- seems that openbsd supports kqueue since 2.9 or earlier
(found kqueue references in 2.9's changelog)

Andrei Pelinescu-Onciul 20 éve
szülő
commit
8386f8d703
2 módosított fájl, 5 hozzáadás és 5 törlés
  1. 2 2
      Makefile.defs
  2. 3 3
      io_wait.c

+ 2 - 2
Makefile.defs

@@ -1001,8 +1001,8 @@ ifeq ($(OS), openbsd)
 		DEFS+= -DUSE_PTHREAD_MUTEX  # try pthread sems
 		DEFS+= -DUSE_PTHREAD_MUTEX  # try pthread sems
 		found_lock_method=yes
 		found_lock_method=yes
 	endif
 	endif
-	# check for ver >= 3.7
-	ifeq ($(shell [ $(OSREL_N) -ge 3007 ] && echo has_kqueue), has_kqueue)
+	# check for ver >=2 9
+	ifeq ($(shell [ $(OSREL_N) -ge 2009 ] && echo has_kqueue), has_kqueue)
 		ifeq ($(NO_KQUEUE),)
 		ifeq ($(NO_KQUEUE),)
 			DEFS+=-DHAVE_KQUEUE
 			DEFS+=-DHAVE_KQUEUE
 		endif
 		endif

+ 3 - 3
io_wait.c

@@ -342,8 +342,8 @@ char* check_poll_method(enum poll_types poll_method)
 			if (os_ver<0x020000) /* if ver < 2.0 */
 			if (os_ver<0x020000) /* if ver < 2.0 */
 				ret="kqueue not supported on NetBSD < 2.0";
 				ret="kqueue not supported on NetBSD < 2.0";
 	#elif defined (__OS_openbsd)
 	#elif defined (__OS_openbsd)
-			if (os_ver<0x0307) /* if ver < 3.7 ??? */
-				ret="kqueue not supported on OpenBSD < 3.7 (?)";
+			if (os_ver<0x0209) /* if ver < 2.9 ? */
+				ret="kqueue not supported on OpenBSD < 2.9 (?)";
 	#endif /* assume that the rest support kqueue ifdef HAVE_KQUEUE */
 	#endif /* assume that the rest support kqueue ifdef HAVE_KQUEUE */
 #endif
 #endif
 			break;	
 			break;	
@@ -376,7 +376,7 @@ enum poll_types choose_poll_method()
 	#elif defined (__OS_netbsd)
 	#elif defined (__OS_netbsd)
 		if (os_ver>=0x020000) /* if ver >= 2.0 */
 		if (os_ver>=0x020000) /* if ver >= 2.0 */
 	#elif defined (__OS_openbsd)
 	#elif defined (__OS_openbsd)
-		if (os_ver>=0x0307) /* if ver >= 3.7 */
+		if (os_ver>=0x0209) /* if ver >= 2.9 (?) */
 	#endif /* assume that the rest support kqueue ifdef HAVE_KQUEUE */
 	#endif /* assume that the rest support kqueue ifdef HAVE_KQUEUE */
 			poll_method=POLL_KQUEUE;
 			poll_method=POLL_KQUEUE;
 #endif
 #endif