Bug#301258: gnome-vfs2: FTBFS on hurd-i386: several issues [patch]
Michael Banck
Michael Banck <mbanck@debian.org>, 301258@bugs.debian.org
Mon, 4 Apr 2005 14:24:04 +0200
--17pEHd4RhPHOinZp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Thu, Mar 24, 2005 at 07:03:46PM +0100, Michael Banck wrote:
> 5. libgnomevfs/gnome-vfs-unix-mounts.c uses PATH_MAX unconditionally in
> an (supposedly) AIX code path (GNOME BZ #171500)
When disabling fam/gamin, another one of those bugs appears in a
different code path.
An updated 19_hurd_path_max.patch is attached.
thanks,
Michael
--
Michael Banck
Debian Developer
mbanck@debian.org
http://www.advogato.org/person/mbanck/diary.html
--17pEHd4RhPHOinZp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="19_hurd_path_max.patch"
--- libgnomevfs/gnome-vfs-unix-mounts.c.orig 2005-03-24 15:49:19.000000000 +0100
+++ libgnomevfs/gnome-vfs-unix-mounts.c 2005-03-24 15:49:55.000000000 +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
--- modules/file-method.c.orig 2005-04-01 02:24:13.000000000 +0200
+++ modules/file-method.c 2005-04-01 02:23:33.000000000 +0200
@@ -87,7 +87,11 @@
if (x > 0)
value = x;
else
+#ifdef MAXPATHLEN
return MAXPATHLEN;
+#else
+ return 4096;
+#endif
}
return value;
@@ -1357,7 +1357,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;
--17pEHd4RhPHOinZp--