diff options
Diffstat (limited to 'src/pulsecore/core-util.h')
-rw-r--r-- | src/pulsecore/core-util.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pulsecore/core-util.h b/src/pulsecore/core-util.h index d9fad11e..18901f47 100644 --- a/src/pulsecore/core-util.h +++ b/src/pulsecore/core-util.h @@ -27,6 +27,7 @@ #include <inttypes.h> #include <stdarg.h> #include <stdio.h> +#include <string.h> #ifdef HAVE_SYS_RESOURCE_H #include <sys/resource.h> @@ -96,6 +97,10 @@ static inline const char *pa_strempty(const char *x) { return x ? x : ""; } +static inline const char *pa_strna(const char *x) { + return x ? x : "n/a"; +} + char *pa_split(const char *c, const char*delimiters, const char **state); char *pa_split_spaces(const char *c, const char **state); @@ -197,7 +202,6 @@ pa_bool_t pa_in_system_mode(void); char *pa_machine_id(void); char *pa_uname_string(void); - #ifdef HAVE_VALGRIND_MEMCHECK_H pa_bool_t pa_in_valgrind(void); #else @@ -209,4 +213,6 @@ static inline pa_bool_t pa_in_valgrind(void) { unsigned pa_gcd(unsigned a, unsigned b); void pa_reduce(unsigned *num, unsigned *den); +unsigned pa_ncpus(void); + #endif |