Package: gnome-vfs / 1:2.24.4-6

19_hurd_path_max.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Index: gnome-vfs-2.24.2/libgnomevfs/gnome-vfs-unix-mounts.c
===================================================================
--- gnome-vfs-2.24.2.orig/libgnomevfs/gnome-vfs-unix-mounts.c	2010-02-06 11:55:48.957282940 +0100
+++ gnome-vfs-2.24.2/libgnomevfs/gnome-vfs-unix-mounts.c	2010-02-06 11:55:49.537282516 +0100
@@ -85,6 +85,9 @@
 
 #define STAT_TIMEOUT_SECONDS 3
 
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
 
 /* Ideally this should not nonblocking stat, since that can block on
  * downed NFS mounts forever, however there seems to be no good way
Index: gnome-vfs-2.24.2/modules/file-method.c
===================================================================
--- gnome-vfs-2.24.2.orig/modules/file-method.c	2010-02-06 11:55:46.929283842 +0100
+++ gnome-vfs-2.24.2/modules/file-method.c	2010-02-06 11:55:49.537282516 +0100
@@ -127,7 +127,11 @@
 		if (x > 0)
 			value = x;
 		else
+#ifdef MAXPATHLEN
 			return MAXPATHLEN;
+#else
+			return 4096;
+#endif
 	}
 
 	return value;
@@ -1660,7 +1664,7 @@
 	char *cache_file_path;
 	FILE *cache_file;
 	char buffer[2048];
-	char escaped_mount_point[PATH_MAX], escaped_trash_path[PATH_MAX];
+	char escaped_mount_point[GET_PATH_MAX()], escaped_trash_path[GET_PATH_MAX()];
 	char *mount_point, *trash_path;
 	struct stat stat_buffer;
 	gboolean removed_item;