[vlc-commits] Contribs: fix projetcM compilation with gcc6

Jean-Baptiste Kempf git at videolan.org
Sat Aug 6 12:17:09 CEST 2016


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Aug  6 11:02:39 2016 +0200| [e08aa964ea30e019f14c125501c790843867919a] | committer: Jean-Baptiste Kempf

Contribs: fix projetcM compilation with gcc6

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e08aa964ea30e019f14c125501c790843867919a
---

 contrib/src/projectM/gcc6.patch | 60 +++++++++++++++++++++++++++++++++++++++++
 contrib/src/projectM/rules.mak  |  1 +
 2 files changed, 61 insertions(+)

diff --git a/contrib/src/projectM/gcc6.patch b/contrib/src/projectM/gcc6.patch
new file mode 100644
index 0000000..7fe5e26
--- /dev/null
+++ b/contrib/src/projectM/gcc6.patch
@@ -0,0 +1,60 @@
+diff -ruN projectM-2.0.1-Source.old/Common.hpp projectM-2.0.1-Source/Common.hpp
+--- projectM-2.0.1-Source.old/Common.hpp	2016-08-06 10:57:57.678183788 +0200
++++ projectM-2.0.1-Source/Common.hpp	2016-08-06 11:01:06.714192806 +0200
+@@ -55,7 +55,7 @@
+ 
+ #ifdef LINUX
+ #include <cstdlib>
+-#define projectM_isnan isnan
++#define projectM_isnan std::isnan
+ 
+ #endif
+ 
+diff -ruN projectM-2.0.1-Source.old/MilkdropPresetFactory/Parser.cpp projectM-2.0.1-Source/MilkdropPresetFactory/Parser.cpp
+--- projectM-2.0.1-Source.old/MilkdropPresetFactory/Parser.cpp	2016-08-06 10:57:57.690183788 +0200
++++ projectM-2.0.1-Source/MilkdropPresetFactory/Parser.cpp	2016-08-06 10:58:47.634186171 +0200
+@@ -1405,7 +1405,7 @@
+   PerFrameEqn * per_frame_eqn;
+   GenExpr * gen_expr;
+ 
+-  if (fs == NULL)
++  if (fs.fail())
+     return NULL;
+   if (param_string == NULL)
+     return NULL;
+@@ -1560,7 +1560,7 @@
+ 
+   if (preset == NULL)
+     return NULL;
+-  if (fs == NULL)
++  if (fs.fail())
+     return NULL;
+ 
+   if ((token = parseToken(fs, name)) != tEq)
+@@ -1874,7 +1874,7 @@
+   /* Null argument checks */
+   if (preset == NULL)
+     return PROJECTM_FAILURE;
+-  if (fs == NULL)
++  if (fs.fail())
+     return PROJECTM_FAILURE;
+   if (token == NULL)
+     return PROJECTM_FAILURE;
+@@ -2165,7 +2165,7 @@
+ 
+   if (token == NULL)
+     return PROJECTM_FAILURE;
+-  if (fs == NULL)
++  if (fs.fail())
+     return PROJECTM_FAILURE;
+   if (preset == NULL)
+     return PROJECTM_FAILURE;
+@@ -2347,7 +2347,7 @@
+   if (token == NULL)
+ 
+     return PROJECTM_FAILURE;
+-  if (fs == NULL)
++  if (fs.fail())
+     return PROJECTM_FAILURE;
+   if (preset == NULL)
+     return PROJECTM_FAILURE;
diff --git a/contrib/src/projectM/rules.mak b/contrib/src/projectM/rules.mak
index b451d57..25e8dc4 100644
--- a/contrib/src/projectM/rules.mak
+++ b/contrib/src/projectM/rules.mak
@@ -22,6 +22,7 @@ endif
 ifdef HAVE_WIN32
 	$(APPLY) $(SRC)/projectM/win32.patch
 endif
+	$(APPLY) $(SRC)/projectM/gcc6.patch
 	$(MOVE)
 
 DEPS_projectM = glew $(DEPS_glew)



More information about the vlc-commits mailing list