[sr-dev] git:4.2:a711f12d: pipelimit: _SC_NPROCESSORS_ONLN is available on FreeBSD
Daniel-Constantin Mierla
miconda at gmail.com
Tue Jan 13 11:28:46 CET 2015
Module: kamailio
Branch: 4.2
Commit: a711f12d5f4b48b3ccf385492d4c93ace7db515c
URL: https://github.com/kamailio/kamailio/commit/a711f12d5f4b48b3ccf385492d4c93ace7db515c
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-01-13T11:27:35+01:00
pipelimit: _SC_NPROCESSORS_ONLN is available on FreeBSD
- used for getting number of cpus
- reported on GH#24
(cherry picked from commit cf65a6ad41396bf5e67d23e12720c420688d7880)
---
Modified: modules/pipelimit/pipelimit.c
---
Diff: https://github.com/kamailio/kamailio/commit/a711f12d5f4b48b3ccf385492d4c93ace7db515c.diff
Patch: https://github.com/kamailio/kamailio/commit/a711f12d5f4b48b3ccf385492d4c93ace7db515c.patch
---
diff --git a/modules/pipelimit/pipelimit.c b/modules/pipelimit/pipelimit.c
index b966fc5..882c205 100644
--- a/modules/pipelimit/pipelimit.c
+++ b/modules/pipelimit/pipelimit.c
@@ -182,7 +182,7 @@ struct module_exports exports= {
};
-#if defined (__OS_darwin) || defined (__OS_freebsd)
+#ifdef __OS_darwin
#include <sys/param.h>
#include <sys/sysctl.h>
#else
@@ -192,7 +192,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;
More information about the sr-dev
mailing list