Description: Avoid unconditionalized use of PATH_MAX to try to build
 fine on hurd too.
Author: Alessio Treglia <alessio@debian.org>
Forwarded: no
---
 src/gui_callbacks.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- nekobee.orig/src/gui_callbacks.c
+++ nekobee/src/gui_callbacks.c
@@ -73,11 +73,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);
+        size_t path_len = strlen(project_directory);
+        if (project_directory[path_len - 1] != '/') {
+            char *buffer;
+            buffer = malloc(path_len + 2);
+            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);
