Browse Source

pipelimit: _SC_NPROCESSORS_ONLN is available on FreeBSD

- used for getting number of cpus
- reported on GH#24
Daniel-Constantin Mierla 10 năm trước cách đây
mục cha
commit
cf65a6ad41
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      modules/pipelimit/pipelimit.c

+ 2 - 2
modules/pipelimit/pipelimit.c

@@ -183,7 +183,7 @@ struct module_exports exports= {
 };
 
 
-#if defined (__OS_darwin) || defined (__OS_freebsd)
+#ifdef __OS_darwin
 #include <sys/param.h>
 #include <sys/sysctl.h>
 #else
@@ -193,7 +193,7 @@ struct module_exports exports= {
 int get_num_cpus() {
 	int count = 0;
 
-#if defined (__OS_darwin) || defined (__OS_freebsd)
+#ifdef __OS_darwin
     int nm[2];
     size_t len;