瀏覽代碼

ratelimit: _SC_NPROCESSORS_ONLN is available on FreeBSD

- used for getting number of cpus
- reported on GH#24
Daniel-Constantin Mierla 10 年之前
父節點
當前提交
7886ddc516
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      modules/ratelimit/ratelimit.c

+ 2 - 2
modules/ratelimit/ratelimit.c

@@ -285,7 +285,7 @@ static int str_cpy(str * dest, str * src)
 	return 0;
 }
 
-#if defined (__OS_darwin) || defined (__OS_freebsd)
+#ifdef __OS_darwin
 #include <sys/param.h>
 #include <sys/sysctl.h>
 #else
@@ -295,7 +295,7 @@ static int str_cpy(str * dest, str * src)
 int get_num_cpus() {
 	int count = 0;
 
-#if defined (__OS_darwin) || defined (__OS_freebsd)
+#ifdef __OS_darwin
     int nm[2];
     size_t len;