Module: kamailio
Branch: master
Commit: 7886ddc516f5a4cef1d3730306a2a2ded06d4986
URL:
https://github.com/kamailio/kamailio/commit/7886ddc516f5a4cef1d3730306a2a2d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-01-12T11:17:15+01:00
ratelimit: _SC_NPROCESSORS_ONLN is available on FreeBSD
- used for getting number of cpus
- reported on GH#24
---
Modified: modules/ratelimit/ratelimit.c
---
Diff:
https://github.com/kamailio/kamailio/commit/7886ddc516f5a4cef1d3730306a2a2d…
Patch:
https://github.com/kamailio/kamailio/commit/7886ddc516f5a4cef1d3730306a2a2d…
---
diff --git a/modules/ratelimit/ratelimit.c b/modules/ratelimit/ratelimit.c
index 6bbe558..13961da 100644
--- a/modules/ratelimit/ratelimit.c
+++ b/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;