public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Georgy Yakovlev" <gyakovlev@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/files/, sys-fs/zfs/
Date: Tue, 21 Dec 2021 02:07:01 +0000 (UTC)	[thread overview]
Message-ID: <1640052390.64eb52417158266e183780b3f1f92743bac97e64.gyakovlev@gentoo> (raw)

commit:     64eb52417158266e183780b3f1f92743bac97e64
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 21 02:05:37 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Dec 21 02:06:30 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64eb5241

sys-fs/zfs: fix test build failure on musl in 2.1.2

PR: https://github.com/openzfs/zfs/pull/12891
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 sys-fs/zfs/files/2.1.2-musl-tests.patch | 58 +++++++++++++++++++++++++++++++++
 sys-fs/zfs/zfs-2.1.2-r1.ebuild          |  1 +
 2 files changed, 59 insertions(+)

diff --git a/sys-fs/zfs/files/2.1.2-musl-tests.patch b/sys-fs/zfs/files/2.1.2-musl-tests.patch
new file mode 100644
index 000000000000..3d2c563f8c51
--- /dev/null
+++ b/sys-fs/zfs/files/2.1.2-musl-tests.patch
@@ -0,0 +1,58 @@
+From 123c87b3c2d75636da79f57a4b0ed60d2a3133a8 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Mon, 20 Dec 2021 12:25:11 -0800
+Subject: [PATCH] zfs-test/mmap_seek: fix build on musl
+
+it needs linux/fs.h for SEEK_DATA and friends
+
+without linux/fs.h:
+
+```
+mmap_seek.c
+mmap_seek.c: In function 'seek_data':
+mmap_seek.c:37:40: error: 'SEEK_DATA' undeclared (first use in this function);
+did you mean 'SEEK_SET'?
+   37 |  off_t data_offset = lseek(fd, offset, SEEK_DATA);
+```
+
+also it needs sys/sysmacros.h for P2ROUNDUP
+without it:
+
+```
+mmap_seek.c: In function 'main':
+mmap_seek.c:122:19: warning:
+implicit declaration of function 'P2ROUNDUP' [-Wimplicit-function-declaration]
+  122 |  seek_hole(fd, 0, P2ROUNDUP(file_size / 2, block_size));
+      |                   ^~~~~~~~~
+powerpc64-gentoo-linux-musl/bin/ld: mmap_seek.o: in function `main':
+mmap_seek.c:(.text.startup+0x1b8): undefined reference to `P2ROUNDUP'
+powerpc64-gentoo-linux-musl/bin/ld: mmap_seek.c:(.text.startup+0x1d8):
+	undefined reference to `P2ROUNDUP'
+powerpc64-gentoo-linux-musl/bin/ld: mmap_seek.c:(.text.startup+0x21c):
+	undefined reference to `P2ROUNDUP'
+collect2: error: ld returned 1 exit status
+make[5]: *** [Makefile:754: mmap_seek] Error 1
+```
+
+Closes: https://github.com/openzfs/zfs/pull/12891
+Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
+---
+ tests/zfs-tests/cmd/mmap_seek/mmap_seek.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c b/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c
+index f476e1dba9a..bb36527aafe 100644
+--- a/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c
++++ b/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c
+@@ -29,7 +29,11 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/mman.h>
++#include <sys/sysmacros.h>
+ #include <errno.h>
++#ifdef __linux__
++#include <linux/fs.h>
++#endif
+ 
+ static void
+ seek_data(int fd, off_t offset, off_t expected)

diff --git a/sys-fs/zfs/zfs-2.1.2-r1.ebuild b/sys-fs/zfs/zfs-2.1.2-r1.ebuild
index c274ee49ba4b..a5b0419a7ed8 100644
--- a/sys-fs/zfs/zfs-2.1.2-r1.ebuild
+++ b/sys-fs/zfs/zfs-2.1.2-r1.ebuild
@@ -104,6 +104,7 @@ RESTRICT="test"
 PATCHES=(
 	"${FILESDIR}/2.1.2-scrub-timers.patch"
 	"${FILESDIR}/2.1.2-openrc-vendor.patch"
+	"${FILESDIR}/2.1.2-musl-tests.patch"
 )
 
 pkg_pretend() {


             reply	other threads:[~2021-12-21  2:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21  2:07 Georgy Yakovlev [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-08-28 15:24 [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/files/, sys-fs/zfs/ Sam James
2025-05-18 10:45 Sam James
2023-10-14  1:53 Sam James
2023-10-08  1:04 Sam James
2023-01-13  4:33 Georgy Yakovlev
2022-07-10 20:46 Sam James
2022-06-30 10:37 Sam James
2021-11-08  6:09 Sam James
2020-10-07  0:00 Georgy Yakovlev
2020-03-30 21:08 Georgy Yakovlev
2020-02-07  5:37 Georgy Yakovlev
2019-11-26 20:32 Georgy Yakovlev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1640052390.64eb52417158266e183780b3f1f92743bac97e64.gyakovlev@gentoo \
    --to=gyakovlev@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox