From 6d40818ec098a8ff8b566bdc539592e20d3ca247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 7 Oct 2009 07:28:15 +0200 Subject: [PATCH] streamvolume: Define cbrt() if it's not available Fixes build on Win32, bug #597537. --- configure.ac | 6 ++++++ gst-libs/gst/interfaces/streamvolume.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/configure.ac b/configure.ac index 0c5b572341..5245fc4b72 100644 --- a/configure.ac +++ b/configure.ac @@ -202,6 +202,12 @@ AX_CREATE_STDINT_H dnl *** checks for functions *** AC_CHECK_FUNCS([localtime_r gmtime_r]) +dnl *** checks for math functions *** +LIBS_SAVE=$LIBS +LIBS="$LIBS $LIBM" +AC_CHECK_FUNCS(cbrt) +LIBS=$LIBS_SAVE + dnl *** checks for types/defines *** dnl Check for FIONREAD ioctl declaration diff --git a/gst-libs/gst/interfaces/streamvolume.c b/gst-libs/gst/interfaces/streamvolume.c index 4a65f15b27..a3efe468cb 100644 --- a/gst-libs/gst/interfaces/streamvolume.c +++ b/gst-libs/gst/interfaces/streamvolume.c @@ -52,6 +52,10 @@ #include "streamvolume.h" #include +#ifndef HAVE_CBRT +#define cbrt(x) (pow(abs(x),1.0/3.0)) +#endif + static void gst_stream_volume_class_init (GstStreamVolumeInterface * iface) {