summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Hartmann <sultan@gentoo.org>2022-06-19 19:45:12 +0200
committerStephan Hartmann <sultan@gentoo.org>2022-06-19 19:45:23 +0200
commitd2c74fe1c6bd290617186d2cd4992f005a288ca2 (patch)
tree070942ed38a27ea7ca4f2e9195833c55efb92713 /sys-cluster
parentgames-strategy/wesnoth: Removed old (diff)
downloadgentoo-d2c74fe1c6bd290617186d2cd4992f005a288ca2.tar.gz
gentoo-d2c74fe1c6bd290617186d2cd4992f005a288ca2.tar.bz2
gentoo-d2c74fe1c6bd290617186d2cd4992f005a288ca2.zip
sys-cluster/ploop: fix building on musl
Closes: https://bugs.gentoo.org/832965 Signed-off-by: Stephan Hartmann <sultan@gentoo.org>
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/ploop/files/ploop-1.14-musl.patch78
-rw-r--r--sys-cluster/ploop/ploop-1.14.1-r1.ebuild1
2 files changed, 79 insertions, 0 deletions
diff --git a/sys-cluster/ploop/files/ploop-1.14-musl.patch b/sys-cluster/ploop/files/ploop-1.14-musl.patch
new file mode 100644
index 00000000000..693135123c5
--- /dev/null
+++ b/sys-cluster/ploop/files/ploop-1.14-musl.patch
@@ -0,0 +1,78 @@
+--- a/lib/balloon_util.c
++++ b/lib/balloon_util.c
+@@ -30,6 +30,7 @@
+ #include <string.h>
+ #include <linux/fs.h>
+ #include <linux/fiemap.h>
++#include <stddef.h>
+
+ #include "ploop.h"
+
+--- a/lib/delta_read.c
++++ b/lib/delta_read.c
+@@ -24,6 +24,7 @@
+ #include <malloc.h>
+ #include <string.h>
+ #include <sys/stat.h>
++#include <stddef.h>
+
+ #include "ploop.h"
+
+--- a/lib/delta_sysfs.c
++++ b/lib/delta_sysfs.c
+@@ -29,6 +29,7 @@
+ #include <linux/fs.h>
+ #include <sys/ioctl.h>
+ #include <sys/utsname.h>
++#include <sys/sysmacros.h>
+
+ #include "ploop.h"
+
+@@ -238,7 +239,7 @@ static int get_dev_num(const char *path, dev_t *dev_num)
+ ploop_err(0, "Unexpected format of %s: %s", path, nbuf);
+ return -1;
+ }
+- *dev_num = gnu_dev_makedev(maj, min);
++ *dev_num = makedev(maj, min);
+ return 0;
+ }
+
+--- a/lib/merge.c
++++ b/lib/merge.c
+@@ -29,6 +29,7 @@
+ #include <linux/types.h>
+ #include <string.h>
+ #include <assert.h>
++#include <stddef.h>
+
+ #include "ploop.h"
+
+--- a/lib/ploop.c
++++ b/lib/ploop.c
+@@ -1087,7 +1087,7 @@ static int get_mount_dir(const char *device, char *out, int size)
+
+ if (get_dev_by_name(device, &dev))
+ return -1;
+- minor = gnu_dev_minor(dev);
++ minor = minor(dev);
+
+ fp = fopen("/proc/self/mountinfo", "r");
+ if (fp == NULL) {
+@@ -1719,7 +1719,7 @@ static int create_ploop_dev(int minor)
+ make_sysfs_dev_name(minor, device + 5, sizeof(device) - 5);
+ /* Create pair /dev/ploopN & /dev/ploopNp1 */
+ if (access(device, F_OK)) {
+- if (mknod(device, S_IFBLK, gnu_dev_makedev(PLOOP_DEV_MAJOR, minor))) {
++ if (mknod(device, S_IFBLK, makedev(PLOOP_DEV_MAJOR, minor))) {
+ ploop_err(errno, "mknod %s", device);
+ return SYSEXIT_MKNOD;
+ }
+@@ -1730,7 +1730,7 @@ static int create_ploop_dev(int minor)
+ }
+ snprintf(devicep1, sizeof(devicep1), "%sp1", device);
+ if (access(devicep1, F_OK)) {
+- if (mknod(devicep1, S_IFBLK, gnu_dev_makedev(PLOOP_DEV_MAJOR, minor+1))) {
++ if (mknod(devicep1, S_IFBLK, makedev(PLOOP_DEV_MAJOR, minor+1))) {
+ ploop_err(errno, "mknod %s", devicep1);
+ return SYSEXIT_MKNOD;
+ }
diff --git a/sys-cluster/ploop/ploop-1.14.1-r1.ebuild b/sys-cluster/ploop/ploop-1.14.1-r1.ebuild
index b8086d22b8d..1dfbcff162d 100644
--- a/sys-cluster/ploop/ploop-1.14.1-r1.ebuild
+++ b/sys-cluster/ploop/ploop-1.14.1-r1.ebuild
@@ -24,6 +24,7 @@ RDEPEND="${DEPEND}
PATCHES=(
"${FILESDIR}"/disable_create_run_dir.patch
+ "${FILESDIR}"/${PN}-1.14-musl.patch
)
DOCS=( tools/README )