Browse Source

pipelimit: _SC_NPROCESSORS_ONLN is available on FreeBSD

- used for getting number of cpus
- reported on GH#24
Daniel-Constantin Mierla 10 years ago
parent
commit
cf65a6ad41
1 changed files with 2 additions and 2 deletions
  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;