[SCM] jackeq/master: Revert "Revert "debian/patches/03-pathmax.patch", err: the target should be stable branch

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Fri Nov 19 08:55:55 UTC 2010


The following commit has been merged in the master branch:
commit 8275f4ffe84585000c0fa0bf62cb06dd15e0d156
Author: Alessio Treglia <alessio at debian.org>
Date:   Fri Nov 19 09:55:14 2010 +0100

    Revert "Revert "debian/patches/03-pathmax.patch", err: the target should be stable branch
    
    This reverts commit 67513c1757dfeb8ff70614ee66b1d7e27c2eb697.

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