guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: e2fsprogs: Fix build with glibc-2.27.


From: Rutger Helling
Subject: 01/01: gnu: e2fsprogs: Fix build with glibc-2.27.
Date: Wed, 2 May 2018 04:13:10 -0400 (EDT)

rhelling pushed a commit to branch core-updates
in repository guix.

commit 7d5adf013127c89826e9fbe9f1a67265b3538609
Author: Rutger Helling <address@hidden>
Date:   Wed May 2 10:07:23 2018 +0200

    gnu: e2fsprogs: Fix build with glibc-2.27.
    
    * gnu/packages/patches/e2fsprogs-glibc-2.27.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/linux.scm (e2fsprogs)[source]: Add patch.
---
 gnu/local.mk                                    |  1 +
 gnu/packages/linux.scm                          |  3 +-
 gnu/packages/patches/e2fsprogs-glibc-2.27.patch | 56 +++++++++++++++++++++++++
 3 files changed, 59 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index bce35f9..aa3109d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -631,6 +631,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/doc++-segfault-fix.patch                        \
   %D%/packages/patches/doxygen-test.patch                      \
   %D%/packages/patches/dvd+rw-tools-add-include.patch          \
+  %D%/packages/patches/e2fsprogs-glibc-2.27.patch              \
   %D%/packages/patches/eigen-arm-neon-fixes.patch              \
   %D%/packages/patches/elfutils-tests-ptrace.patch             \
   %D%/packages/patches/elixir-disable-failing-tests.patch      \
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index be0c1f8..35dc6ee 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -750,7 +750,8 @@ slabtop, and skill.")
                    name "-" version ".tar.xz"))
              (sha256
               (base32
-               "00ilv65dzcgiap435j89xk86shf7rrav3wsik7cahy789qijdcn9"))))
+               "00ilv65dzcgiap435j89xk86shf7rrav3wsik7cahy789qijdcn9"))
+             (patches (search-patches "e2fsprogs-glibc-2.27.patch"))))
     (build-system gnu-build-system)
     (inputs `(("util-linux" ,util-linux)))
     (native-inputs `(("pkg-config" ,pkg-config)
diff --git a/gnu/packages/patches/e2fsprogs-glibc-2.27.patch 
b/gnu/packages/patches/e2fsprogs-glibc-2.27.patch
new file mode 100644
index 0000000..f0bc713
--- /dev/null
+++ b/gnu/packages/patches/e2fsprogs-glibc-2.27.patch
@@ -0,0 +1,56 @@
+Copied from:
+https://github.com/openwrt/openwrt/blob/58a95f0f8ff768b43d68eed2b6a786e0f40f723b/tools/e2fsprogs/patches/005-misc-rename-copy_file_range-to-copy_file_chunk.patch
+
+From 01551bdba16ab16512a01affe02ade32c41ede8a Mon Sep 17 00:00:00 2001
+From: Palmer Dabbelt <address@hidden>
+Date: Fri, 29 Dec 2017 10:19:51 -0800
+Subject: [PATCH] misc: rename copy_file_range to copy_file_chunk
+
+As of 2.27, glibc will have a copy_file_range library call to wrap the
+new copy_file_range system call.  This conflicts with the function in
+misc/create_inode.c, which this patch renames _copy_file_range.
+
+Signed-off-by: Palmer Dabbelt <address@hidden>
+Signed-off-by: Theodore Ts'o <address@hidden>
+---
+ misc/create_inode.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/misc/create_inode.c
++++ b/misc/create_inode.c
+@@ -392,7 +392,7 @@ static ssize_t my_pread(int fd, void *bu
+ }
+ #endif /* !defined HAVE_PREAD64 && !defined HAVE_PREAD */
+ 
+-static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file,
++static errcode_t copy_file_chunk(ext2_filsys fs, int fd, ext2_file_t e2_file,
+                                off_t start, off_t end, char *buf,
+                                char *zerobuf)
+ {
+@@ -466,7 +466,7 @@ static errcode_t try_lseek_copy(ext2_fil
+ 
+               data_blk = data & ~(fs->blocksize - 1);
+               hole_blk = (hole + (fs->blocksize - 1)) & ~(fs->blocksize - 1);
+-              err = copy_file_range(fs, fd, e2_file, data_blk, hole_blk, buf,
++              err = copy_file_chunk(fs, fd, e2_file, data_blk, hole_blk, buf,
+                                     zerobuf);
+               if (err)
+                       return err;
+@@ -516,7 +516,7 @@ static errcode_t try_fiemap_copy(ext2_fi
+               }
+               for (i = 0, ext = ext_buf; i < fiemap_buf->fm_mapped_extents;
+                    i++, ext++) {
+-                      err = copy_file_range(fs, fd, e2_file, ext->fe_logical,
++                      err = copy_file_chunk(fs, fd, e2_file, ext->fe_logical,
+                                             ext->fe_logical + ext->fe_length,
+                                             buf, zerobuf);
+                       if (err)
+@@ -569,7 +569,7 @@ static errcode_t copy_file(ext2_filsys f
+               goto out;
+ #endif
+ 
+-      err = copy_file_range(fs, fd, e2_file, 0, statbuf->st_size, buf,
++      err = copy_file_chunk(fs, fd, e2_file, 0, statbuf->st_size, buf,
+                             zerobuf);
+ out:
+       ext2fs_free_mem(&zerobuf);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]