summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-03-14 22:00:05 +0100
committerMarius Bakke <mbakke@fastmail.com>2018-03-14 22:11:34 +0100
commitec07ba1ff73d6317470517ccf530a4a89b216f23 (patch)
tree21c5ba60a4cb1be54b7bf38166c6bfd4e969b6ae /gnu/packages/patches
parent74733195244f645158a89c0aa74d6fc6ae525060 (diff)
downloadguix-ec07ba1ff73d6317470517ccf530a4a89b216f23.tar.gz
gnu: patch: Update to 2.7.6.
* gnu/packages/base.scm (patch): Update to 2.7.6.
* gnu/packages/patches/patch-hurd-path-max.patch: Adjust to upstream changes.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/patch-hurd-path-max.patch15
1 files changed, 8 insertions, 7 deletions
diff --git a/gnu/packages/patches/patch-hurd-path-max.patch b/gnu/packages/patches/patch-hurd-path-max.patch
index 81e37930c2..1845a5803b 100644
--- a/gnu/packages/patches/patch-hurd-path-max.patch
+++ b/gnu/packages/patches/patch-hurd-path-max.patch
@@ -13,7 +13,7 @@ Subject: [PATCH] Do not rely on PATH_MAX when reading a symlink target.
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/src/util.c b/src/util.c
-index 82a7e37..c4c0f9d 100644
+index 1cc08ba..67dbd3a 100644
 --- a/src/util.c
 +++ b/src/util.c
 @@ -460,12 +460,12 @@ move_file (char const *from, bool *from_needs_removal,
@@ -31,18 +31,19 @@ index 82a7e37..c4c0f9d 100644
  	    size += i;
  	  if (i != 0 || close (fd) != 0)
  	    read_fatal ();
-@@ -610,9 +610,9 @@ copy_file (char const *from, char const *to, struct stat *tost,
+@@ -610,10 +610,10 @@ copy_file (char const *from, char const *to, struct stat *tost,
  
    if (S_ISLNK (mode))
      {
--      char *buffer = xmalloc (PATH_MAX);
+-      char *buffer = xmalloc (PATH_MAX + 1);
 +      char *buffer = xmalloc (tost->st_size + 1);
+       ssize_t r;
  
--      if (safe_readlink (from, buffer, PATH_MAX) < 0)
-+      if (safe_readlink (from, buffer, tost->st_size) < 0)
+-      if ((r = safe_readlink (from, buffer, PATH_MAX)) < 0)
++      if ((r = safe_readlink (from, buffer, tost->st_size)) < 0)
  	pfatal ("Can't read %s %s", "symbolic link", from);
+       buffer[r] = '\0';
        if (safe_symlink (buffer, to) != 0)
- 	pfatal ("Can't create %s %s", "symbolic link", to);
 -- 
-2.4.2
+2.16.2