Module: kamailio
Branch: 4.2
Commit: f0159a194a8ac0c0f5599867764d447ef2b5bf45
URL:
https://github.com/kamailio/kamailio/commit/f0159a194a8ac0c0f5599867764d447…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-01-13T11:27:46+01:00
ratelimit: _SC_NPROCESSORS_ONLN is available on FreeBSD
- used for getting number of cpus
- reported on GH#24
(cherry picked from commit 7886ddc516f5a4cef1d3730306a2a2ded06d4986)
---
Modified: modules/ratelimit/ratelimit.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f0159a194a8ac0c0f5599867764d447…
Patch:
https://github.com/kamailio/kamailio/commit/f0159a194a8ac0c0f5599867764d447…
---
diff --git a/modules/ratelimit/ratelimit.c b/modules/ratelimit/ratelimit.c
index 561185f..2770822 100644
--- a/modules/ratelimit/ratelimit.c
+++ b/modules/ratelimit/ratelimit.c
@@ -293,7 +293,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
@@ -303,7 +303,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;