[pulseaudio-discuss] [PATCH 2/2] core-util: include xlocale.h when using strtod_l()

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Wed May 20 12:35:28 PDT 2015

Based on some googling, strtod_l() is defined in xlocale.h on BSD.
Glibc seems to define it in stdlib.h, but only if GNU extensions are
enabled (otherwise the function won't be available). So, this patch
should fix the use of strtod_l() on BSDs, but on other systems things
may or may not be still broken.

The original patch author is Jakob Fink <jfink at gmx.at>. He sent this
patch to the freebsd-gnome mailing list:

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=90285
 src/pulsecore/core-util.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 824368a..ba31221 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -54,6 +54,7 @@
 #include <locale.h>
+#include <xlocale.h>
 #ifdef HAVE_SCHED_H

More information about the pulseaudio-discuss mailing list