diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-02-06 00:25:47 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-02-06 00:25:47 +0100 |
commit | 04c3c6716b20ca8362ceea3d2e7fa23954f9a441 (patch) | |
tree | d30ab16343f377e5b0b10f1205e82b4efd887a36 /src/pulsecore | |
parent | 9f39a44488644e8d54e9c8a4096abf2d39040c1f (diff) |
A few MacOS X portability fixes
Based on patches contributed by "Tron".
See bug #478.
Diffstat (limited to 'src/pulsecore')
-rw-r--r-- | src/pulsecore/core-util.c | 4 | ||||
-rw-r--r-- | src/pulsecore/proplist-util.c | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index b7ebdeb7..ad6c6ca9 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -88,6 +88,10 @@ #include <samplerate.h> #endif +#ifdef __APPLE__ +#include <xlocale.h> +#endif + #include <pulse/xmalloc.h> #include <pulse/util.h> #include <pulse/utf8.h> diff --git a/src/pulsecore/proplist-util.c b/src/pulsecore/proplist-util.c index c09c8af5..8a447cf7 100644 --- a/src/pulsecore/proplist-util.c +++ b/src/pulsecore/proplist-util.c @@ -27,6 +27,13 @@ #include <locale.h> #include <dlfcn.h> +#ifdef __APPLE__ +#include <crt_externs.h> +#define environ (*_NSGetEnviron()) +#elif !HAVE_DECL_ENVIRON +extern char **environ; +#endif + #include <pulse/proplist.h> #include <pulse/utf8.h> #include <pulse/xmalloc.h> @@ -37,9 +44,6 @@ #include "proplist-util.h" void pa_init_proplist(pa_proplist *p) { -#if !HAVE_DECL_ENVIRON - extern char **environ; -#endif char **e; const char *pp; |