소스 검색

pipelimit: _SC_NPROCESSORS_ONLN is available on FreeBSD

- used for getting number of cpus
- reported on GH#24
Daniel-Constantin Mierla 10 년 전
부모
커밋
cf65a6ad41
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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;