diff options
author | Björn-Egil Dahlberg <[email protected]> | 2012-10-10 01:55:44 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2012-10-10 01:55:44 +0200 |
commit | e5a1aa05455574f6220887fea7ba61b833062fe9 (patch) | |
tree | b74b7fa271cf83fb802a4c32a0987556b17e9e08 /erts/lib_src/common/erl_misc_utils.c | |
parent | 624751813b30a367c8255e86f26f7342aeb33cbc (diff) | |
download | otp-e5a1aa05455574f6220887fea7ba61b833062fe9.tar.gz otp-e5a1aa05455574f6220887fea7ba61b833062fe9.tar.bz2 otp-e5a1aa05455574f6220887fea7ba61b833062fe9.zip |
erts: Fix '#ifdef' for unused static functions
On architectures where cpu topology was unavailable,
warnings erupted due to unused static functions.
Those warnings are now silenced.
Diffstat (limited to 'erts/lib_src/common/erl_misc_utils.c')
-rw-r--r-- | erts/lib_src/common/erl_misc_utils.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/erts/lib_src/common/erl_misc_utils.c b/erts/lib_src/common/erl_misc_utils.c index 46852f6926..1b49f69581 100644 --- a/erts/lib_src/common/erl_misc_utils.c +++ b/erts/lib_src/common/erl_misc_utils.c @@ -122,6 +122,12 @@ #include <sys/sysctl.h> #endif +/* Simplify include for static functions */ + +#if defined(__linux__) || defined(HAVE_KSTAT) || defined(__WIN32__) || defined(__FreeBSD__) +# define ERTS_CPU_TOPOLOGY_ENABLED (1) +#endif + static int read_topology(erts_cpu_info_t *cpuinfo); #if defined(ERTS_HAVE_MISC_UTIL_AFFINITY_MASK__) @@ -667,6 +673,7 @@ erts_unbind_from_cpu_str(char *str) } +#if defined(ERTS_CPU_TOPOLOGY_ENABLED) static int pn_cmp(const void *vx, const void *vy) { @@ -757,6 +764,7 @@ adjust_processor_nodes(erts_cpu_info_t *cpuinfo, int no_nodes) } } } +#endif #ifdef __linux__ |