[Pkg-shadow-commits] r1023 - trunk/debian/patches
Christian Perrier
bubulle at costa.debian.org
Sat Jun 10 13:29:41 UTC 2006
Author: bubulle
Date: 2006-06-10 13:29:40 +0000 (Sat, 10 Jun 2006)
New Revision: 1023
Added:
trunk/debian/patches/403_fix_PATH-MAX_hurd
Log:
Really add this patch
Added: trunk/debian/patches/403_fix_PATH-MAX_hurd
===================================================================
--- trunk/debian/patches/403_fix_PATH-MAX_hurd 2006-06-10 13:10:42 UTC (rev 1022)
+++ trunk/debian/patches/403_fix_PATH-MAX_hurd 2006-06-10 13:29:40 UTC (rev 1023)
@@ -0,0 +1,49 @@
+Goal: Fix FTBFS on Hurd because PATH-MAX is undefined
+
+Fix: #372155
+
+Author: Michael Banck <mbanck at debian.org>
+
+Status wrt upstream: should be forwarded
+
+Index: shadow-4.0.16/lib/commonio.c
+===================================================================
+--- shadow-4.0.16.orig/lib/commonio.c 2006-06-10 15:28:25.914736344 +0200
++++ shadow-4.0.16/lib/commonio.c 2006-06-10 15:28:53.717509680 +0200
+@@ -47,20 +47,34 @@
+ int lrename (const char *old, const char *new)
+ {
+
++#ifdef PATH_MAX
+ char resolved_path[PATH_MAX];
++#endif
++ char *r;
+ int res;
+
+ #if defined(S_ISLNK)
+ struct stat sb = { 0 };
+ if (lstat (new, &sb) == 0 && S_ISLNK (sb.st_mode)) {
+- if (realpath (new, resolved_path) == NULL) {
++#ifndef PATH_MAX
++ r = realpath (new, NULL);
++#else
++ r = realpath (new, resolved_path);
++#endif
++ if (r == NULL) {
++#ifndef PATH_MAX
++ free (r);
++#endif
+ perror ("realpath in lrename()");
+ } else {
+- new = resolved_path;
++ new = r;
+ }
+ }
+ #endif
+ res = rename (old, new);
++#ifndef PATH_MAX
++ free (r);
++#endif
+ return res;
+ }
+
More information about the Pkg-shadow-commits
mailing list