diff -urN ffmpeg-orig/libavcodec/mpegaudiodec.c ffmpeg/libavcodec/mpegaudiodec.c
--- ffmpeg-orig/libavcodec/mpegaudiodec.c	2007-02-03 13:15:55.000000000 +0000
+++ ffmpeg/libavcodec/mpegaudiodec.c	2008-05-25 13:51:09.000000000 +0000
@@ -28,7 +28,7 @@
 #include "avcodec.h"
 #include "bitstream.h"
 #include "dsputil.h"
-
+#define llrint(x) (long long)rint(x)
 /*
  * TODO:
  *  - in low precision mode, use more 16 bit multiplies in synth filter
diff -urN ffmpeg-orig/libavcodec/wmaenc.c ffmpeg/libavcodec/wmaenc.c
--- ffmpeg-orig/libavcodec/wmaenc.c	2007-02-06 23:58:02.000000000 +0000
+++ ffmpeg/libavcodec/wmaenc.c	2008-05-25 13:56:33.000000000 +0000
@@ -24,6 +24,7 @@
 
 #undef NDEBUG
 #include <assert.h>
+#define lrint(d)		((int32_t)rint(d))
 
 
 static int encode_init(AVCodecContext * avctx){
diff -urN ffmpeg-orig/libavcodec/xvidff.c ffmpeg/libavcodec/xvidff.c
--- ffmpeg-orig/libavcodec/xvidff.c	2006-10-15 16:52:33.000000000 +0000
+++ ffmpeg/libavcodec/xvidff.c	2008-05-25 13:46:49.000000000 +0000
@@ -75,6 +75,10 @@
 int xvid_strip_vol_header(AVCodecContext *avctx, unsigned char *frame, unsigned int header_len, unsigned int frame_len);
 int xvid_ff_2pass(void *ref, int opt, void *p1, void *p2);
 void xvid_correct_framerate(AVCodecContext *avctx);
+float roundf(float x)
+{
+        return (float) ((x - ((long)x) >= 0.5f) ? (((long)x) + 1) : ((long)x));
+}       
 
 /**
  * Creates the private context for the encoder.
diff -urN ffmpeg-orig/libavutil/internal.h ffmpeg/libavutil/internal.h
--- ffmpeg-orig/libavutil/internal.h	2007-01-07 11:11:49.000000000 +0000
+++ ffmpeg/libavutil/internal.h	2008-05-25 12:47:44.000000000 +0000
@@ -298,26 +298,10 @@
 }
 
 #ifndef HAVE_LRINTF
-/* XXX: add ISOC specific test to avoid specific BSD testing. */
-/* better than nothing implementation. */
-/* btw, rintf() is existing on fbsd too -- alex */
-static av_always_inline long int lrintf(float x)
+static long int lrintf(float x)
 {
-#ifdef __MINGW32__
-#  ifdef ARCH_X86_32
-    int32_t i;
-    asm volatile(
-        "fistpl %0\n\t"
-        : "=m" (i) : "t" (x) : "st"
-    );
-    return i;
-#  else
     /* XXX: incorrect, but make it compile */
     return (int)(x + (x < 0 ? -0.5 : 0.5));
-#  endif /* ARCH_X86_32 */
-#else
-    return (int)(rint(x));
-#endif /* __MINGW32__ */
 }
 #endif /* HAVE_LRINTF */
 
