[SCM] yoshimi/master: Add patch to fix FTBFS on hurd-i386. (Closes: #885249)
mira-guest at users.alioth.debian.org
mira-guest at users.alioth.debian.org
Thu Dec 28 18:39:39 UTC 2017
The following commit has been merged in the master branch:
commit f375538f0230d56e2dc614551c0934c3b9c22e27
Author: Jaromír Mikeš <mira.mikes at seznam.cz>
Date: Thu Dec 28 19:10:37 2017 +0100
Add patch to fix FTBFS on hurd-i386. (Closes: #885249)
diff --git a/debian/patches/02-fix-path_max.patch b/debian/patches/02-fix-path_max.patch
new file mode 100644
index 0000000..b6e0386
--- /dev/null
+++ b/debian/patches/02-fix-path_max.patch
@@ -0,0 +1,48 @@
+Description: Fix FTBFS on hurd-i386: PATH_MAX undeclared.
+Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=885249
+Author: Svante Signell <svante.signell at gmail.com>
+Forwarded: Will Godfrey <willgodfrey at musically.me.uk>
+
+Index: yoshimi/src/Misc/Config.cpp
+===================================================================
+--- yoshimi.orig/src/Misc/Config.cpp
++++ yoshimi/src/Misc/Config.cpp
+@@ -231,17 +231,16 @@ bool Config::Setup(int argc, char **argv
+ }
+ if (restoreState)
+ {
+- char * fp;
++ char *fp = NULL;
+ if (! StateFile.size()) goto no_state0;
+- else fp = new char [PATH_MAX];
++ fp = realpath (StateFile.c_str(), NULL);
++ if (fp == NULL) goto no_state0;
+
+- if (! realpath (StateFile.c_str(), fp)) goto no_state1;
+ StateFile = fp;
+- delete (fp);
++ free (fp);
+
+ if (! isRegFile(StateFile))
+ {
+- no_state1: delete (fp);
+ no_state0: Log("Invalid state file specified for restore " + StateFile, 2);
+ return true;
+ }
+Index: yoshimi/src/Misc/MiscFuncs.cpp
+===================================================================
+--- yoshimi.orig/src/Misc/MiscFuncs.cpp
++++ yoshimi/src/Misc/MiscFuncs.cpp
+@@ -339,9 +339,9 @@ string MiscFuncs::setExtension(string fn
+ // replace 'src' with a different one in the compilation directory
+ string MiscFuncs::localPath(string leaf)
+ {
+- char *tmpath;
+- tmpath = (char*) malloc(PATH_MAX);
+- getcwd (tmpath, PATH_MAX);
++ char *tmpath = getcwd (NULL, 0);
++ if (tmpath == NULL)
++ return "";
+ string path = (string) tmpath;
+ size_t found = path.rfind("/src");
+ if (found != string::npos)
diff --git a/debian/patches/series b/debian/patches/series
index ac0ed64..5fde134 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
01-gcc_flags.patch
+02-fix-path_max.patch
--
yoshimi packaging
More information about the pkg-multimedia-commits
mailing list