From 07876e25c8773b28967f8992c77f69e25f8cf7c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Date: Fri, 23 Apr 2010 16:28:10 +0000 Subject: [PATCH] Workaround for missing llrintf() Originally committed as revision 22954 to svn://svn.ffmpeg.org/ffmpeg/trunk --- configure | 2 ++ libavcodec/audioconvert.c | 1 + libavutil/libm.h | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/configure b/configure index 02ea987755..0b76e8b669 100755 --- a/configure +++ b/configure @@ -1052,6 +1052,7 @@ HAVE_LIST=" libdc1394_1 libdc1394_2 llrint + llrintf local_aligned_16 local_aligned_8 log2 @@ -2585,6 +2586,7 @@ check_lib va/va.h vaInitialize -lva check_mathfunc exp2 check_mathfunc exp2f check_mathfunc llrint +check_mathfunc llrintf check_mathfunc log2 check_mathfunc log2f check_mathfunc lrint diff --git a/libavcodec/audioconvert.c b/libavcodec/audioconvert.c index a38d87351f..d022bc9ee3 100644 --- a/libavcodec/audioconvert.c +++ b/libavcodec/audioconvert.c @@ -26,6 +26,7 @@ */ #include "libavutil/avstring.h" +#include "libavutil/libm.h" #include "avcodec.h" #include "audioconvert.h" diff --git a/libavutil/libm.h b/libavutil/libm.h index db014a9066..c7c28ac27c 100644 --- a/libavutil/libm.h +++ b/libavutil/libm.h @@ -43,6 +43,11 @@ #define llrint(x) ((long long)rint(x)) #endif /* HAVE_LLRINT */ +#if !HAVE_LLRINTF +#undef llrintf +#define llrintf(x) ((long long)rint(x)) +#endif /* HAVE_LLRINT */ + #if !HAVE_LOG2 #undef log2 #define log2(x) (log(x) * 1.44269504088896340736) -- GitLab