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.
This commit is contained in:
parent
7473319524
commit
ec07ba1ff7
@ -217,14 +217,14 @@ standard utility.")
|
||||
(define-public patch
|
||||
(package
|
||||
(name "patch")
|
||||
(version "2.7.5")
|
||||
(version "2.7.6")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://gnu/patch/patch-"
|
||||
version ".tar.xz"))
|
||||
(sha256
|
||||
(base32
|
||||
"16d2r9kpivaak948mxzc0bai45mqfw73m113wrkmbffnalv1b5gx"))
|
||||
"1zfqy4rdcy279vwn2z1kbv19dcfw25d2aqy9nzvdkq5bjzd0nqdc"))
|
||||
(patches (search-patches "patch-hurd-path-max.patch"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs `(("ed" ,ed)))
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user