[SCM] hexter/master: Avoid unconditionalized use of PATH_MAX to try to build fine on hurd too.

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Tue Oct 5 13:40:36 UTC 2010


The following commit has been merged in the master branch:
commit fba183036c408900466421f50a6011f27e74e0ee
Author: Alessio Treglia <alessio at debian.org>
Date:   Tue Oct 5 15:37:26 2010 +0200

    Avoid unconditionalized use of PATH_MAX to try to build fine on hurd too.

diff --git a/debian/patches/01-pathmax.patch b/debian/patches/01-pathmax.patch
new file mode 100644
index 0000000..f28b7d5
--- /dev/null
+++ b/debian/patches/01-pathmax.patch
@@ -0,0 +1,28 @@
+Description: Avoid unconditionalized use of PATH_MAX to try to build
+ fine on hurd too.
+Author: Alessio Treglia <alessio at debian.org>
+Forwarded: no
+---
+ src/gui_callbacks.c |    9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- hexter.orig/src/gui_callbacks.c
++++ hexter/src/gui_callbacks.c
+@@ -66,11 +66,14 @@ file_selection_set_path(GtkWidget *file_
+         gtk_file_selection_set_filename(GTK_FILE_SELECTION(file_selection),
+                                         file_selection_last_filename);
+     } else if (project_directory && strlen(project_directory)) {
+-        if (project_directory[strlen(project_directory) - 1] != '/') {
+-            char buffer[PATH_MAX];
+-            snprintf(buffer, PATH_MAX, "%s/", project_directory);
++        path_len = strlen(project_directory);
++        if (project_directory[path_len - 1] != '/') {
++            char *buffer;
++            buffer = malloc(path_len + 2); /* buflen = project_directory + '/' + '\0' */
++            snprintf(buffer, path_len + 2, "%s/", project_directory);
+             gtk_file_selection_set_filename(GTK_FILE_SELECTION(file_selection),
+                                             buffer);
++            free(buffer);
+         } else {
+             gtk_file_selection_set_filename(GTK_FILE_SELECTION(file_selection),
+                                             project_directory);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..bd9ae9f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01-pathmax.patch

-- 
hexter packaging



More information about the pkg-multimedia-commits mailing list