diff --git a/srcpkgs/bcachefs-tools/patches/musl.patch b/srcpkgs/bcachefs-tools/patches/musl.patch new file mode 100644 index 00000000000..88761f3d2d4 --- /dev/null +++ b/srcpkgs/bcachefs-tools/patches/musl.patch @@ -0,0 +1,40 @@ +--- a/include/linux/log2.h ++++ b/include/linux/log2.h +@@ -194,7 +194,7 @@ + __rounddown_pow_of_two(n) \ + ) + +-static inline __attribute_const__ ++static inline __attribute__((const)) + int __order_base_2(unsigned long n) + { + return n > 1 ? ilog2(n - 1) + 1 : 0; +@@ -274,7 +274,7 @@ + * + * The result is undefined if the size is 0. + */ +-static inline __attribute_const__ int get_order(unsigned long size) ++static inline __attribute__((const)) int get_order(unsigned long size) + { + if (__builtin_constant_p(size)) { + if (!size) +--- a/libbcachefs/bcachefs_format.h ++++ b/libbcachefs/bcachefs_format.h +@@ -72,6 +72,7 @@ + * inode number, 64 bit offset, 96 bit version field, etc.) for negligible cost. + */ + ++#include + #include + #include + #include +--- a/libbcachefs/siphash.c ++++ b/libbcachefs/siphash.c +@@ -44,6 +44,7 @@ + * https://131002.net/siphash/ + */ + ++#include + #include + #include + #include diff --git a/srcpkgs/bcachefs-tools/template b/srcpkgs/bcachefs-tools/template new file mode 100644 index 00000000000..63ae509da08 --- /dev/null +++ b/srcpkgs/bcachefs-tools/template @@ -0,0 +1,19 @@ +# Template file for 'bcachefs-tools' +pkgname=bcachefs-tools +version=24 +revision=1 +build_style=gnu-makefile +make_install_args="ROOT_SBINDIR=/usr/bin" +make_use_env=yes +hostmakedepends="pkg-config" +makedepends="attr-devel keyutils-devel libaio-devel libblkid-devel + liblz4-devel libscrypt-devel libsodium-devel libudev-devel liburcu-devel + libuuid-devel libzstd-devel zlib-devel" +short_desc="Userspace tools for bcachefs" +maintainer="Leah Neukirchen " +license="GPL-2.0-only" +homepage="https://bcachefs.org/" +distfiles="https://github.com/koverstreet/bcachefs-tools/archive/refs/tags/v${version}.tar.gz" +checksum=4631f8ba752c562f0e7d74a8052bace39abefa98421e4a2989069d988892c264 + +export VERSION=v${version}