[vlc-commits] contribs: openjpeg: Fix windows build
Hugo Beauzée-Luyssen
git at videolan.org
Fri Feb 27 15:51:43 CET 2015
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Jan 9 16:52:03 2015 +0100| [c4fa23a3de82eb02171db7fb3e6e99c60d1eb7fe] | committer: Hugo Beauzée-Luyssen
contribs: openjpeg: Fix windows build
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c4fa23a3de82eb02171db7fb3e6e99c60d1eb7fe
---
contrib/src/openjpeg/msvc.patch | 11 +++++++++++
contrib/src/openjpeg/rules.mak | 3 +++
2 files changed, 14 insertions(+)
diff --git a/contrib/src/openjpeg/msvc.patch b/contrib/src/openjpeg/msvc.patch
new file mode 100644
index 0000000..ec00afe
--- /dev/null
+++ b/contrib/src/openjpeg/msvc.patch
@@ -0,0 +1,11 @@
+--- openjpeg/libopenjpeg/opj_includes.h 2012-02-07 11:49:55.000000000 +0100
++++ /home/vlc/vlc/contrib/windowsphone/openjpeg/libopenjpeg/opj_includes.h 2014-12-15 16:54:31.303058600 +0100
+@@ -87,7 +87,7 @@
+ #endif
+
+ /* MSVC and Borland C do not have lrintf */
+-#if defined(_MSC_VER) || defined(__BORLANDC__)
++#if (defined(_MSC_VER) && _MSC_VER < 1800) || defined(__BORLANDC__)
+ static INLINE long lrintf(float f){
+ #ifdef _M_X64
+ return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f));
diff --git a/contrib/src/openjpeg/rules.mak b/contrib/src/openjpeg/rules.mak
index f9d4316..eeafcc9 100644
--- a/contrib/src/openjpeg/rules.mak
+++ b/contrib/src/openjpeg/rules.mak
@@ -11,6 +11,9 @@ $(TARBALLS)/openjpeg-$(OPENJPEG_VERSION).tar.gz:
openjpeg: openjpeg-$(OPENJPEG_VERSION).tar.gz .sum-openjpeg
$(UNPACK)
$(APPLY) $(SRC)/openjpeg/freebsd.patch
+ifdef HAVE_VISUALSTUDIO
+ $(APPLY) $(SRC)/openjpeg/msvc.patch
+endif
$(UPDATE_AUTOCONFIG)
$(MOVE)
More information about the vlc-commits
mailing list