diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/pulsecore/core-util.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 5250804b..d03774ed 100644 --- a/configure.ac +++ b/configure.ac @@ -267,7 +267,7 @@ AC_CHECK_FUNCS([getopt_long], [], [AC_CHECK_LIB([iberty], [getopt_long])]) #### Check for functions #### # ISO -AC_CHECK_FUNCS([lrintf]) +AC_CHECK_FUNCS([lrintf strtof]) # POSIX AC_FUNC_FORK diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index 6a0bd0ac..afd89bad 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -1300,7 +1300,11 @@ int pa_atof(const char *s, float *ret_f) { #endif { errno = 0; +#ifdef HAVE_STRTOF f = strtof(s, &x); +#else + f = strtod(s, &x); +#endif } if (!x || *x || errno != 0) |