Commit 15971663 authored by Axel Beckert's avatar Axel Beckert

Fix FTBFS on GNU/Hurd (Closes: #653362)

Patch by Svante Signell <svante.signell@telia.com>
parent 20a8bfba
mp4h (1.3.1-7) UNRELEASED; urgency=low
* Fix FTBFS on GNU/Hurd (Closes: #653362) Thanks to Svante Signell for
investigation and the patch!
-- Axel Beckert <abe@debian.org> Wed, 28 Dec 2011 01:04:53 +0100
mp4h (1.3.1-6) unstable; urgency=low
* Bump Standards-Version to 3.9.2
......
Description: Fixes FTBFS on GNU Hurd
Source: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653362#5
Author: Svante Signell <svante.signell@telia.com>
diff -ur mp4h-1.3.1/configure.ac mp4h-1.3.1.modified/configure.ac
--- mp4h-1.3.1/configure.ac 2011-12-27 12:09:55.000000000 +0100
+++ mp4h-1.3.1.modified/configure.ac 2011-12-27 12:41:20.000000000 +0100
@@ -38,7 +38,7 @@
AC_CHECK_HEADERS([limits.h locale.h memory.h stdarg.h string.h unistd.h time.h])
AC_CHECK_HEADERS([pwd.h grp.h dirent.h sys/param.h sys/stat.h sys/types.h sys/times.h])
-AC_CHECK_FUNCS([mkstemp strchr strerror tmpfile getpwuid getgrgid bcopy memmove])
+AC_CHECK_FUNCS([mkstemp strchr strerror tmpfile getpwuid getgrgid bcopy memmove canonicalize_file_name])
AC_FUNC_ALLOCA
AC_FUNC_VPRINTF
AC_REPLACE_FUNCS(strtol obstack xmalloc xstrdup)
diff -ur mp4h-1.3.1/src/builtin.c mp4h-1.3.1.modified/src/builtin.c
--- mp4h-1.3.1/src/builtin.c 2011-12-27 12:09:56.000000000 +0100
+++ mp4h-1.3.1.modified/src/builtin.c 2011-12-27 12:41:23.000000000 +0100
@@ -1468,7 +1468,11 @@
mp4h_bp_real_path (MP4H_BUILTIN_ARGS)
{
const char *pathname;
+#ifdef HAVE_CANONICALIZE_FILE_NAME
+ char *resolvedname = NULL;
+#else
char resolvedname[MAXPATHLEN];
+#endif
CHECK_SAFETY_LEVEL(1);
@@ -1478,12 +1482,22 @@
_("Warning:%s:%d: In <%s>, required attribute `%s' is not specified"),
CURRENT_FILE_LINE, ARG (0), "pathname"));
else
+#ifdef HAVE_CANONICALIZE_FILE_NAME
+ if ((resolvedname = canonicalize_file_name(pathname)) == NULL)
+#else
if (!realpath(pathname, resolvedname))
+#endif
MP4HERROR ((warning_status, errno,
_("Error:%s:%d: Cannot form real path for `%s'"),
CURRENT_FILE_LINE, pathname));
else
+ {
obstack_grow(obs, resolvedname, strlen(resolvedname));
+#ifdef HAVE_CANONICALIZE_FILE_NAME
+ free(resolvedname);
+#endif
+
+ }
}
#endif /* HAVE_FILE_FUNCS */
......@@ -2,3 +2,4 @@
559822-nmu.diff
573599-regression.diff
lintian-cleanup-tg.diff
653362-fix-ftbfs-on-hurd.diff
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment