]> code.delx.au - pulseaudio/commitdiff
core-util: use the generic PATH_MAX variant of pa_realpath on Mac OS X
authorMihai Moldovan <ionic@ionic.de>
Tue, 29 May 2012 07:21:54 +0000 (09:21 +0200)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Sat, 16 Jun 2012 05:04:41 +0000 (10:34 +0530)
realpath() on OS X behaves GNUish and accepts NULL for resolved_name
only on 10.6 and higher. Older versions will crash, if resolved_name is
NULL.

All versions define PATH_MAX, though. Better play it safe and use the
generic PATH_MAX version of pa_realpath on Mac OS X systems.

Signed-off-by: Mihai Moldovan <ionic@ionic.de>
src/pulsecore/core-util.c

index 834c69be32e093ab6bf4bb57c74f9241063c6edb..1275c6e76de39ffa8e42d15015ae5a036db50784 100644 (file)
@@ -3003,7 +3003,7 @@ char *pa_realpath(const char *path) {
         return NULL;
     }
 
-#if defined(__GLIBC__) || defined(__APPLE__)
+#if defined(__GLIBC__)
     {
         char *r;