Package: gftp Severity: important Tags: patch Dear Maintainer,
gftp currently FTBFS on Hurd because of the unconditional use of PATH_MAX. The attached patch should fix this issue. WBR, Cyril Roelandt. -- System Information: Debian Release: wheezy/sid APT prefers unreleased APT policy: (500, 'unreleased'), (500, 'unstable') Architecture: hurd-i386 (i686-AT386) Kernel: GNU-Mach 1.3.99/Hurd-0.3 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/dash
--- gftp-2.0.19.orig/lib/local.c 2007-04-27 00:40:50.000000000 +0000 +++ gftp-2.0.19/lib/local.c 2012-05-05 02:18:49.000000000 +0000 @@ -54,13 +54,23 @@ static int local_getcwd (gftp_request * request) { - char tempstr[PATH_MAX], *utf8; +#ifdef __GNU__ + char *tempstr; +#else + char tempstr[PATH_MAX]; +#endif + char *utf8; size_t destlen; if (request->directory != NULL) g_free (request->directory); +#ifdef __GNU__ + tempstr = get_current_dir_name(); + if (tempstr == NULL) +#else if (getcwd (tempstr, sizeof (tempstr)) == NULL) +#endif { request->logging_function (gftp_logging_error, request, _("Could not get current working directory: %s\n"), @@ -75,6 +85,9 @@ else request->directory = g_strdup (tempstr); +#ifdef __GNU__ + free(tempstr); +#endif return (0); } --- gftp-2.0.19.orig/lib/gftp.h 2008-03-28 11:44:39.000000000 +0000 +++ gftp-2.0.19/lib/gftp.h 2012-05-05 21:54:38.000000000 +0000 @@ -51,7 +51,9 @@ #include <netinet/in.h> #include <arpa/inet.h> #include <glib.h> +#ifndef __GNU__ #include <limits.h> +#endif #include <netdb.h> #include <stdio.h> #include <stdarg.h>