avutil/utils: check and warn about llrint() brokenness
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 7 Jun 2013 00:25:34 +0000 (02:25 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 15 Jun 2013 09:22:22 +0000 (11:22 +0200)
Such broken llrint() exist for example on netbsd

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/utils.c

index c157aa8..2159d1c 100644 (file)
@@ -45,6 +45,10 @@ unsigned avutil_version(void)
         abort();
     }
 
+    if (llrint(1LL<<60) != 1LL<<60) {
+        av_log(NULL, AV_LOG_ERROR, "Libavutil has been linked to a broken llrint()\n");
+    }
+
     ff_check_pixfmt_descriptors();
     checks_done = 1;
     return LIBAVUTIL_VERSION_INT;