[SCM] jackeq/master.stable: debian/patches/03-pathmax.patch: Avoid unconditionalized use of PATH_MAX to fix build failure on hurd architecture.
alessio at users.alioth.debian.org
alessio at users.alioth.debian.org
Wed Nov 3 10:31:49 UTC 2010
The following commit has been merged in the master.stable branch:
commit e55652d36ca9d5f11eda224358f128d36828c134
Author: Alessio Treglia <alessio at debian.org>
Date: Wed Nov 3 11:31:06 2010 +0100
debian/patches/03-pathmax.patch: Avoid unconditionalized use of PATH_MAX to fix build failure on hurd architecture.
diff --git a/debian/patches/03-pathmax.patch b/debian/patches/03-pathmax.patch
new file mode 100644
index 0000000..238641c
--- /dev/null
+++ b/debian/patches/03-pathmax.patch
@@ -0,0 +1,41 @@
+Description: Avoid unconditionalized use of PATH_MAX to fix build failure
+ on hurd architecture.
+Author: Alessio Treglia <alessio at debian.org>
+Forwarded: https://sourceforge.net/support/tracker.php?aid=3102139
+---
+ src/main.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+--- jackeq.orig/src/main.c
++++ jackeq/src/main.c
+@@ -32,8 +32,9 @@ gboolean update_meters(gpointer data);
+
+ int main(int argc, char *argv[])
+ {
+- char rcfile[PATH_MAX], title[128];
++ char *rcfile, title[128];
+ int fd;
++ size_t rcfile_size;
+
+
+ #ifdef ENABLE_NLS
+@@ -50,7 +51,10 @@ int main(int argc, char *argv[])
+
+ /* look for the rcfile, if its there parse it */
+
+- snprintf(rcfile, PATH_MAX, "%s/%s", getenv("HOME"), ".jackeqrc");
++ /* $HOME + 10 + 1 = $HOME + "/.jackeqrc" + '\0' */
++ rcfile_size = strlen(getenv("HOME")) + 11;
++ rcfile = malloc(rcfile_size);
++ snprintf(rcfile, rcfile_size, "%s/%s", getenv("HOME"), ".jackeqrc");
+ if ((fd = open(rcfile, O_RDONLY)) >= 0) { close(fd);
+ printf("Using jackeqrc file: %s\n", rcfile);
+ gtk_rc_parse(rcfile);
+@@ -76,6 +80,7 @@ int main(int argc, char *argv[])
+ process_init();
+ g_timeout_add(100, update_meters, NULL);
+ gtk_main();
++ free(rcfile);
+
+ return 0;
+ }
diff --git a/debian/patches/series b/debian/patches/series
index 92dc794..8413412 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
01-binutils_gold.patch
02-l10n.patch
+03-pathmax.patch
--
jackeq packaging
More information about the pkg-multimedia-commits
mailing list