summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-10-28 21:05:14 +0100
committerSam James <sam@gentoo.org>2022-10-28 21:09:27 +0100
commit0ee601a96f4c89a77cf65549009c019cc81591d6 (patch)
treeb705aa986e915372b0e489127c4f3c5d77664d79 /sys-fs/dd-rescue
parentsys-fs/cryptsetup: drop 2.4.3 (diff)
downloadgentoo-0ee601a96f4c89a77cf65549009c019cc81591d6.tar.gz
gentoo-0ee601a96f4c89a77cf65549009c019cc81591d6.tar.bz2
gentoo-0ee601a96f4c89a77cf65549009c019cc81591d6.zip
sys-fs/dd-rescue: drop 1.99.8-r1
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-fs/dd-rescue')
-rw-r--r--sys-fs/dd-rescue/Manifest1
-rw-r--r--sys-fs/dd-rescue/dd-rescue-1.99.8-r1.ebuild108
-rw-r--r--sys-fs/dd-rescue/files/dd-rescue-1.99.8-sysrandom.patch27
-rw-r--r--sys-fs/dd-rescue/files/dd-rescue-1.99.8-testhole.patch32
-rw-r--r--sys-fs/dd-rescue/files/dd-rescue-1.99.8-xattr.patch300
-rw-r--r--sys-fs/dd-rescue/files/dd_rescue-1.99-musl-r2.patch161
6 files changed, 0 insertions, 629 deletions
diff --git a/sys-fs/dd-rescue/Manifest b/sys-fs/dd-rescue/Manifest
index 269fad7c0926..a2fbbbd2380c 100644
--- a/sys-fs/dd-rescue/Manifest
+++ b/sys-fs/dd-rescue/Manifest
@@ -1,3 +1,2 @@
DIST dd_rescue-1.99.11.tar.bz2 181927 BLAKE2B 8cd4db6cb8d85962e4cea50b0006fdbe5f085fbcf7bdbfe4d0fab1fe33412c1379317f54429c76ed1d905e32d5e791869fa27f2f14917cb1c3842fc6caca2a12 SHA512 e1d32711421ebbafd80fd210718667ff8c2d22b5349945105b3e4c29d54d381385b1fd188b2d8aa1b7a0aaf2cc9d8f7374373cff3992726a3d17549ca50f3904
DIST dd_rescue-1.99.12.tar.bz2 181798 BLAKE2B 547910af7ac5dde360179dbd75bed36e6420dda162a41f9bb60a454f5c6629d6a1be9b15240ce3d0e7b80e09c660a87765e826909614b037a506ad775b71041f SHA512 61f4f09e7e8442049634c5a5659f887cf82b16bc8b768c0aa79774e18feac6e91fbc258e5a6c8c3cac0577fadbdd26206261cf6c99b3980f763a1b584fb46001
-DIST dd_rescue-1.99.8.tar.bz2 174594 BLAKE2B 51e62989bf6318cb5926f30bc1db746bddd41fb49aab15dc2b1c67e0af079469161d390ba4e1e109d195249b3aace3aa830a3aec14ba534eb47f38c0136f910c SHA512 a230e1df4532671ea631036012dd1e38614e45bed58b00757f0017b0ea60f14ac3bdac07777d175aa4929def593b3c8485e463b1fc25b5067adf4cf3f3ac040d
diff --git a/sys-fs/dd-rescue/dd-rescue-1.99.8-r1.ebuild b/sys-fs/dd-rescue/dd-rescue-1.99.8-r1.ebuild
deleted file mode 100644
index d421dc83aa03..000000000000
--- a/sys-fs/dd-rescue/dd-rescue-1.99.8-r1.ebuild
+++ /dev/null
@@ -1,108 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit toolchain-funcs flag-o-matic multilib autotools
-
-MY_PN="${PN/-/_}"
-MY_P="${MY_PN}-${PV}"
-
-DESCRIPTION="Similar to dd but can copy from source with errors"
-HOMEPAGE="http://www.garloff.de/kurt/linux/ddrescue/"
-SRC_URI="http://www.garloff.de/kurt/linux/ddrescue/${MY_P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~mips ppc ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
-IUSE="cpu_flags_x86_avx2 lzo cpu_flags_x86_sse4_2 static xattr"
-
-RDEPEND="lzo? ( dev-libs/lzo )
- xattr? ( sys-apps/attr )"
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}"/${MY_PN}-1.99-musl-r2.patch
- "${FILESDIR}"/${PN}-1.99.8-xattr.patch
- "${FILESDIR}"/${PN}-1.99.8-sysrandom.patch
- "${FILESDIR}"/${PN}-1.99.8-testhole.patch
-)
-
-src_prepare() {
- default
-
- sed -i \
- -e 's:-ldl:$(LDFLAGS) -ldl:' \
- -e 's:-shared:$(CFLAGS) $(LDFLAGS) -shared:' \
- Makefile || die
-
- if ! use cpu_flags_x86_sse4_2; then
- sed -i \
- -e 's:^CC_FLAGS_CHECK(-msse4.2,SSE42):#&:' \
- configure.in || die
- fi
-
- if ! use cpu_flags_x86_avx2; then
- sed -i \
- -e 's:^CC_FLAGS_CHECK(-mavx2,AVX2):#&:' \
- configure.in || die
- fi
-
- eautoreconf
-}
-
-src_configure() {
- use static && append-ldflags -static
- # OpenSSL is only used by a random helper tool we don't install.
- ac_cv_header_attr_xattr_h=$(usex xattr) \
- ac_cv_header_openssl_evp_h=no \
- ac_cv_lib_crypto_EVP_aes_192_ctr=no \
- ac_cv_lib_lzo2_lzo1x_1_compress=$(usex lzo) \
- ac_cv_header_lzo_lzo1x_h=$(usex lzo) \
- econf
-}
-
-_emake() {
- local arch
- case ${ARCH} in
- x86) arch=i386;;
- amd64) arch=x86_64;;
- arm) arch=arm;;
- arm64) arch=aarch64;;
- esac
-
- local os=$(usex kernel_linux Linux IDK)
-
- # The Makefile is a mess. Override a few vars rather than patch it.
- emake \
- MACH="${arch}" \
- OS="${os}" \
- HAVE_SSE42=$(usex cpu_flags_x86_sse4_2 1 0) \
- HAVE_AVX2=$(usex cpu_flags_x86_avx2 1 0) \
- RPM_OPT_FLAGS="${CFLAGS} ${CPPFLAGS}" \
- CFLAGS_OPT='$(CFLAGS)' \
- LDFLAGS="${LDFLAGS} -Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/${PN}" \
- CC="$(tc-getCC)" \
- "$@"
-}
-
-src_compile() {
- _emake
-}
-
-src_test() {
- append-cflags -fcommon # bug 707796
- _emake check
-}
-
-src_install() {
- # easier to install by hand than trying to make sense of the Makefile.
- dobin dd_rescue
- dodir /usr/$(get_libdir)/${PN}
- cp -pPR libddr_*.so "${ED%/}"/usr/$(get_libdir)/${PN}/ || die
- dodoc README.dd_rescue
- doman dd_rescue.1
- use lzo && doman ddr_lzo.1
-}
diff --git a/sys-fs/dd-rescue/files/dd-rescue-1.99.8-sysrandom.patch b/sys-fs/dd-rescue/files/dd-rescue-1.99.8-sysrandom.patch
deleted file mode 100644
index 5ef3da297747..000000000000
--- a/sys-fs/dd-rescue/files/dd-rescue-1.99.8-sysrandom.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Use sys/random.h for getrandom() decl if present.
-
---- a/configure.in
-+++ b/configure.in
-@@ -6,7 +6,7 @@ AC_C_INLINE
- AC_HEADER_STDC
- #AC_PROG_INSTALL
- #CFLAGS="$CFLAGS -DHAVE_CONFIG_H"
--AC_CHECK_HEADERS([fallocate.h dlfcn.h unistd.h sys/xattr.h sys/acl.h sys/ioctl.h sys/reg.h endian.h linux/fs.h linux/fiemap.h stdint.h lzo/lzo1x.h openssl/evp.h linux/random.h malloc.h sched.h sys/statvfs.h])
-+AC_CHECK_HEADERS([fallocate.h dlfcn.h unistd.h sys/xattr.h sys/acl.h sys/ioctl.h sys/reg.h endian.h linux/fs.h linux/fiemap.h stdint.h lzo/lzo1x.h openssl/evp.h linux/random.h sys/random.h malloc.h sched.h sys/statvfs.h])
- AC_CHECK_FUNCS([ffs ffsl basename fallocate64 splice getopt_long open64 pread pread64 lseek64 stat64 posix_fadvise posix_fadvise64 __builtin_prefetch htobe64 feof_unlocked getline getentropy getrandom posix_memalign valloc sched_yield fstatvfs __builtin_cpu_supports])
- AC_CHECK_LIB(dl,dlsym)
- AC_CHECK_LIB(fallocate,linux_fallocate64)
---- a/random.c
-+++ b/random.c
-@@ -23,6 +23,10 @@ typedef unsigned int __u32;
- #include <linux/random.h>
- #endif
-
-+#ifdef HAVE_SYS_RANDOM_H
-+#include <sys/random.h>
-+#endif
-+
- static void msleep(unsigned int msecs)
- {
- struct timespec ts1, ts2;
-
diff --git a/sys-fs/dd-rescue/files/dd-rescue-1.99.8-testhole.patch b/sys-fs/dd-rescue/files/dd-rescue-1.99.8-testhole.patch
deleted file mode 100644
index 444907088b3b..000000000000
--- a/sys-fs/dd-rescue/files/dd-rescue-1.99.8-testhole.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-commit 7f2ff6434586083747bc5d046e0207886025e684
-Author: Kurt Garloff <kurt@garloff.de>
-Date: Sat May 12 09:54:45 2018 +0000
-
- Fix test case by ensuring there is a hole ...
-
-diff --git a/test_crypt.sh b/test_crypt.sh
-index 47f1fc9..62cf853 100755
---- a/test_crypt.sh
-+++ b/test_crypt.sh
-@@ -52,13 +52,20 @@ rm dd_rescue2
-
- # Holes (all), skiphole
- echo "*** Holes ***"
-+# Produce file that consists of dd_rescue + hole + dd_rescue
- ./dd_rescue -qpt dd_rescue dd_rescue3
- ./dd_rescue -qS 512k dd_rescue dd_rescue3
-+# Ensure there is a hole even if dd_rescue is long
-+./dd_rescue -qS 384k -m 128k /dev/zero dd_rescue3
-+# Test without and with skiphole
- enc_dec_compare_keys dd_rescue3 AES192-CTR keygen:ivgen "" "" "-qpt"
- enc_dec_compare_keys dd_rescue3 AES192-CTR keygen:ivgen skiphole "" "-qpt"
-+# Store 384k-512k in cmp3
- ./dd_rescue -qt -s 384k -m 128k -S 0 dd_rescue3.cmp dd_rescue3.cmp3
-+# Should be 128k of zeroes
- ./dd_rescue -qm 128k /dev/zero dd_rescue3.cmp2
- cmp dd_rescue3.cmp2 dd_rescue3.cmp3 || exit 4
-+# Repeat test with reverse
- enc_dec_compare_keys dd_rescue3 AES192-CTR keygen:ivgen "" "" "-qptr"
- enc_dec_compare_keys dd_rescue3 AES192-CTR keygen:ivgen skiphole "" "-qptr"
- ./dd_rescue -qt -s 384k -m 128k -S 0 dd_rescue3.cmp dd_rescue3.cmp3
-
diff --git a/sys-fs/dd-rescue/files/dd-rescue-1.99.8-xattr.patch b/sys-fs/dd-rescue/files/dd-rescue-1.99.8-xattr.patch
deleted file mode 100644
index 39e719c33861..000000000000
--- a/sys-fs/dd-rescue/files/dd-rescue-1.99.8-xattr.patch
+++ /dev/null
@@ -1,300 +0,0 @@
---- dd_rescue-1.99.8/configure.in
-+++ dd_rescue-1.99.8/configure.in
-@@ -6,7 +6,7 @@
- AC_HEADER_STDC
- #AC_PROG_INSTALL
- #CFLAGS="$CFLAGS -DHAVE_CONFIG_H"
--AC_CHECK_HEADERS([fallocate.h dlfcn.h unistd.h attr/xattr.h sys/acl.h sys/ioctl.h sys/reg.h endian.h linux/fs.h linux/fiemap.h stdint.h lzo/lzo1x.h openssl/evp.h linux/random.h malloc.h sched.h sys/statvfs.h])
-+AC_CHECK_HEADERS([fallocate.h dlfcn.h unistd.h sys/xattr.h sys/acl.h sys/ioctl.h sys/reg.h endian.h linux/fs.h linux/fiemap.h stdint.h lzo/lzo1x.h openssl/evp.h linux/random.h malloc.h sched.h sys/statvfs.h])
- AC_CHECK_FUNCS([ffs ffsl basename fallocate64 splice getopt_long open64 pread pread64 lseek64 stat64 posix_fadvise posix_fadvise64 __builtin_prefetch htobe64 feof_unlocked getline getentropy getrandom posix_memalign valloc sched_yield fstatvfs __builtin_cpu_supports])
- AC_CHECK_LIB(dl,dlsym)
- AC_CHECK_LIB(fallocate,linux_fallocate64)
---- dd_rescue-1.99.8/dd_rescue.c
-+++ dd_rescue-1.99.8/dd_rescue.c
-@@ -161,8 +161,8 @@
- #endif
-
- /* xattrs */
--#ifdef HAVE_ATTR_XATTR_H
--# include <attr/xattr.h>
-+#ifdef HAVE_SYS_XATTR_H
-+# include <sys/xattr.h>
- #else
- /* TODO: Could provide the prototypes for the syscalls ourselves ... */
- # warning No support for copying extended attributes / ACLs
-@@ -1276,7 +1276,7 @@
-
- /** Copy xattrs */
- int copyxattr(const char* inm, const char* onm)
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- {
- char *attrs = NULL;
- ssize_t aln = listxattr(inm, NULL, 0);
-@@ -2486,7 +2486,7 @@
- #ifdef FITRIM
- fprintf(stderr, "fitrim ");
- #endif
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- fprintf(stderr, "xattr ");
- #endif
- #if (defined(__x86_64__) || defined(__i386__)) && !defined(NO_RDRND)
---- dd_rescue-1.99.8/libddr_crypt.c
-+++ dd_rescue-1.99.8/libddr_crypt.c
-@@ -47,8 +47,8 @@
- #include <endian.h>
- #include <signal.h>
-
--#ifdef HAVE_ATTR_XATTR_H
--#include <attr/xattr.h>
-+#ifdef HAVE_SYS_XATTR_H
-+#include <sys/xattr.h>
- #endif
-
- #if __WORDSIZE == 64
-@@ -90,7 +90,7 @@
- size_t saltlen;
- loff_t lastpos;
- loff_t processed;
--#if 1 //def HAVE_ATTR_XATTR_H
-+#if 1 //def HAVE_SYS_XATTR_H
- char* salt_xattr_name;
- char sxattr, sxfallback;
- char* key_xattr_name;
-@@ -113,13 +113,13 @@
- " Parameters: [alg[o[rithm]]=]ALG:enc[rypt]:dec[rypt]:engine=STR:pad=STR\n"
- "\t:keyhex=HEX:keyfd=[x]INT[@INT@INT]:keyfile=NAME[@INT@INT]:keygen:keysfile\n"
- "\t:ivhex=HEX:ivfd=[x]INT[@INT@INT]:ivfile=NAME[@INT@INT]:ivgen:ivsfile\n"
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- "\t:keyxattr[=xattr_name]:kxfallback:ivxattr[=xattr_name]:ixfallback\n"
- #endif
- "\t:pass=STR:passfd=[x]INT[@INT@INT]:passfile=NAME[@INT@INT]\n"
- "\t:salt=STR:salthex=HEX:saltfd=[x]INT[@INT@INT]:saltfile=NAME[@INT@INT]\n"
- "\t:saltlen=INT:saltgen:saltsfile"
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- ":saltxattr[=xattr_name]:sxfallback"
- #endif
- "\n\t:pbkdf2[=INT]:opbkdf[11]:debug:bench[mark]:skiphole:weakrnd:outkeyiv:ctrbug198\n"
-@@ -346,7 +346,7 @@
- state->saltlen = ATOL(param+8);
- else if (!strcmp(param, "saltgen"))
- state->sgen = 1;
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- else if (!strcmp(param, "saltxattr"))
- err += set_flag(&state->sxattr, "saltxattr");
- else if (!memcmp(param, "saltxattr=", 10)) {
-@@ -709,7 +709,7 @@
- return err;
- }
-
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- int get_xattr(crypt_state *state, const char* atrnm,
- unsigned char* data, int dlen,
- char fb, char* fbf, char* flag)
-@@ -883,7 +883,7 @@
- sprintf(ivsnm, "IVS.%s", state->alg->name);
- sprintf(keynm, "KEYS.%s", state->alg->name);
- sprintf(saltnm, "SALT.%s", state->alg->name);
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- if (state->sxattr && !state->salt_xattr_name) {
- state->salt_xattr_name = malloc(32);
- snprintf(state->salt_xattr_name, 32, "user.salt.%s", state->alg->name);
-@@ -958,7 +958,7 @@
- }
-
- /* 5c */
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- /* Try getting salt from xattr */
- if (!state->sset && state->sxattr && !get_salt_xattr(state) && !state->enc)
- state->sxattr = 0;
-@@ -999,7 +999,7 @@
- if (write_file(state->sec->salt, state->sfnm, 8, 0640))
- return -1;
- }
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- /* Write salt to xattr */
- if (state->sxattr && state->enc && set_salt_xattr(state)) {
- if (!state->sxfallback)
-@@ -1028,7 +1028,7 @@
- if (!state->keyf && !state->kxattr)
- FPLOG(WARN, "Generated key not written anywhere?\n", NULL);
- else {
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- /* Write key to xattr, failure is fatal */
- if (state->kxattr && state->enc && set_key_xattr(state) && !state->kxfallback)
- return -1;
-@@ -1066,7 +1066,7 @@
- FPLOG(FATAL, "Key generation with pass+salt failed!\n", NULL);
- return -1;
- }
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- /* Write key to xattr, failure is fatal */
- if (state->kxattr && state->enc && set_key_xattr(state) && !state->kxfallback)
- return -1;
-@@ -1077,7 +1077,7 @@
- return -1;
-
- } else {
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- if (state->kxattr)
- get_key_xattr(state);
- #endif
-@@ -1100,7 +1100,7 @@
- }
- }
- } else {
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- if (state->kxattr && set_key_xattr(state) && !state->kxfallback) {
- FPLOG(FATAL, "Can't save key in xattr");
- return -1;
-@@ -1123,7 +1123,7 @@
- if (!state->ivf && !state->ixattr)
- FPLOG(WARN, "Generated IV not saved?\n", NULL);
- else {
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- /* Write IV to xattr, failure w/o fb is fatal */
- if (state->ixattr && state->enc && set_iv_xattr(state) && !state->ixfallback)
- return -1;
-@@ -1149,7 +1149,7 @@
- return -1;
- }
- }
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- /* Write IV to xattr, failure w/o fb is fatal */
- if (state->ixattr && state->enc && set_iv_xattr(state) && !state->ixfallback)
- return -1;
-@@ -1159,7 +1159,7 @@
- if (write_keyfile(state, ivsnm, encnm, state->sec->nonce1, BLKSZ, 0640, 1, 0))
- return -1;
- } else {
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- if (state->ixattr)
- get_iv_xattr(state);
- #endif
-@@ -1180,7 +1180,7 @@
- }
- }
- } else if (state->alg->stream->needs_iv) {
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- if (state->ixattr && set_iv_xattr(state) && !state->ixfallback) {
- FPLOG(FATAL, "Can't save IV in xattr");
- return -1;
-@@ -1454,7 +1454,7 @@
- FPLOG(INFO, "%.2fs CPU time, %.1fMiB/s\n",
- (double)state->cpu/CLOCKS_PER_SEC,
- state->processed/1024 / (state->cpu/(CLOCKS_PER_SEC/1024.0)));
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- if (state->salt_xattr_name)
- free(state->salt_xattr_name);
- if (state->key_xattr_name)
---- dd_rescue-1.99.8/libddr_hash.c
-+++ dd_rescue-1.99.8/libddr_hash.c
-@@ -36,8 +36,8 @@
- #include <netinet/in.h> /* For ntohl/htonl */
- #include <endian.h>
-
--#ifdef HAVE_ATTR_XATTR_H
--#include <attr/xattr.h>
-+#ifdef HAVE_SYS_XATTR_H
-+#include <sys/xattr.h>
- #endif
- // TODO: pass at runtime rather than compile time
- #define HASH_DEBUG(x) if (state->debug) x
-@@ -75,7 +75,7 @@
- #endif
- int hmacpln;
- char xfallback;
--#if 1 //def HAVE_ATTR_XATTR_H
-+#if 1 //def HAVE_SYS_XATTR_H
- char chk_xattr, set_xattr, xnmalloc;
- char* xattr_name;
- #endif
-@@ -90,7 +90,7 @@
- ":multipart=size"
- #endif
- "\n"
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- "\t:chk_xattr[=xattr_name]:set_xattr[=xattr_name]:fallb[ack][=FILE]\n"
- #endif
- " Use algorithm=help to get a list of supported hash algorithms\n";
-@@ -167,7 +167,7 @@
- state->append = param+7;
- else if (!memcmp(param, "prepend=", 8))
- state->prepend = param+8;
--#if 1 //def HAVE_ATTR_XATTR_H
-+#if 1 //def HAVE_SYS_XATTR_H
- else if (!memcmp(param, "chk_xattr=", 10)) {
- state->chk_xattr = 1; state->xattr_name = param+10; }
- else if (!strcmp(param, "chk_xattr"))
-@@ -258,7 +258,7 @@
- FPLOG(FATAL, "No hash algorithm specified\n");
- return --err;
- }
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- if ((state->chk_xattr || state->set_xattr) && !state->xattr_name) {
- state->xattr_name = (char*)malloc(32);
- state->xnmalloc = 1;
-@@ -269,7 +269,7 @@
- }
- #endif
- if ((!state->chkfnm || !*state->chkfnm) && (state->chkf || state->outf
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- || state->xfallback
- #endif
- )) {
-@@ -301,7 +301,7 @@
- if (!stat || !(*stat))
- return -1;
- hash_state *state = (hash_state*)*stat;
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- if (state->xnmalloc)
- free((void*)state->xattr_name);
- #endif
-@@ -351,7 +351,7 @@
- strcat(nnm, "->");
- strcat(nnm, opt->oname);
- state->fname = nnm;
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- if (state->chk_xattr || state->set_xattr) {
- --err;
- FPLOG(WARN, "Can't access xattr in the middle of a plugin chain!");
-@@ -607,7 +607,7 @@
- return err;
- }
-
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- int check_xattr(hash_state* state, const char* res)
- {
- char xatstr[144];
-@@ -734,7 +734,7 @@
- err += check_chkf(state, res);
- if (state->outf)
- err += write_chkf(state, res);
--#ifdef HAVE_ATTR_XATTR_H
-+#ifdef HAVE_SYS_XATTR_H
- if (state->chk_xattr)
- err += check_xattr(state, res);
- if (state->set_xattr)
diff --git a/sys-fs/dd-rescue/files/dd_rescue-1.99-musl-r2.patch b/sys-fs/dd-rescue/files/dd_rescue-1.99-musl-r2.patch
deleted file mode 100644
index c98ddeca13a0..000000000000
--- a/sys-fs/dd-rescue/files/dd_rescue-1.99-musl-r2.patch
+++ /dev/null
@@ -1,161 +0,0 @@
-From e96b79c9e4cd6c40ba6e5fe495904f07a95fb909 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi@gentoo.org>
-Date: Wed, 13 Dec 2017 01:02:12 +0100
-Subject: [PATCH 49/49] loff_t and __WORDSIZE includes for MUSL
-
-Rewrite of Justin Keogh's patch [Link 1] to fix build problems
-on ARM.
-
-Link 1: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f5abc0f1b036921d6eb5b0f434c960ed280619f
-Fixes: https://bugs.gentoo.org/616364
----
- configure.in | 2 +-
- ddr_ctrl.h | 3 +++
- ffs.h | 3 +++
- fiemap.h | 4 ++++
- fmt_no.h | 2 ++
- fstrim.h | 3 +++
- libddr_hash.c | 4 ++++
- libddr_lzo.c | 3 +++
- libddr_null.c | 3 +++
- sha512.h | 4 ++++
- 10 files changed, 30 insertions(+), 1 deletion(-)
-
-diff --git a/configure.in b/configure.in
-index eb2e813..355ea84 100644
---- a/configure.in
-+++ b/configure.in
-@@ -6,7 +6,7 @@ AC_C_INLINE
- AC_HEADER_STDC
- #AC_PROG_INSTALL
- #CFLAGS="$CFLAGS -DHAVE_CONFIG_H"
--AC_CHECK_HEADERS([fallocate.h dlfcn.h unistd.h attr/xattr.h sys/acl.h sys/ioctl.h endian.h linux/fs.h linux/fiemap.h stdint.h lzo/lzo1x.h openssl/evp.h linux/random.h malloc.h sched.h sys/statvfs.h])
-+AC_CHECK_HEADERS([fallocate.h dlfcn.h unistd.h attr/xattr.h sys/acl.h sys/ioctl.h sys/reg.h endian.h linux/fs.h linux/fiemap.h stdint.h lzo/lzo1x.h openssl/evp.h linux/random.h malloc.h sched.h sys/statvfs.h])
- AC_CHECK_FUNCS([ffs ffsl basename fallocate64 splice getopt_long open64 pread pread64 lseek64 stat64 posix_fadvise posix_fadvise64 __builtin_prefetch htobe64 feof_unlocked getline getentropy getrandom posix_memalign valloc sched_yield fstatvfs __builtin_cpu_supports])
- AC_CHECK_LIB(dl,dlsym)
- AC_CHECK_LIB(fallocate,linux_fallocate64)
-diff --git a/ddr_ctrl.h b/ddr_ctrl.h
-index ac71e4f..58cffd5 100644
---- a/ddr_ctrl.h
-+++ b/ddr_ctrl.h
-@@ -7,6 +7,9 @@
- * License: GNU GPLv2 or v3
- */
-
-+#define _GNU_SOURCE
-+#include <fcntl.h>
-+
- #ifndef _DDR_CTRL_H
- #define _DDR_CTRL_H
-
-diff --git a/ffs.h b/ffs.h
-index 2215080..c1f3444 100644
---- a/ffs.h
-+++ b/ffs.h
-@@ -28,6 +28,9 @@
- #include <endian.h>
- #endif
-
-+#ifdef HAVE_SYS_REG_H
-+#include <sys/reg.h>
-+#endif
-
- #ifdef HAVE_FFS
- # define myffs(x) ffs(x)
-diff --git a/fiemap.h b/fiemap.h
-index df1ba95..31cde3b 100644
---- a/fiemap.h
-+++ b/fiemap.h
-@@ -29,5 +29,9 @@
-
- #endif /* HAVE_LINUX_FS_H */
-
-+#ifdef HAVE_SYS_REG_H
-+#include <sys/reg.h>
-+#endif
-+
- #endif /* _FIEMAPH */
-
-diff --git a/fmt_no.h b/fmt_no.h
-index cb0a81b..52ec236 100644
---- a/fmt_no.h
-+++ b/fmt_no.h
-@@ -1,4 +1,6 @@
- /** Decl for int to str conversion with highlighting */
-+#define _GNU_SOURCE
-+#include <fcntl.h>
-
- #ifndef _FMT_NO_H
- #define _FMT_NO_H
-diff --git a/fstrim.h b/fstrim.h
-index 7447061..b9cdcbb 100644
---- a/fstrim.h
-+++ b/fstrim.h
-@@ -1,3 +1,6 @@
-+#define _GNU_SOURCE
-+#include <fcntl.h>
-+
- #ifndef _FSTRIM_H
- #define _FSTRIM_H
-
-diff --git a/libddr_hash.c b/libddr_hash.c
-index 7c8cdf8..cdbbd4d 100644
---- a/libddr_hash.c
-+++ b/libddr_hash.c
-@@ -33,6 +33,10 @@
- #include <unistd.h>
- #include <fcntl.h>
-
-+#ifdef HAVE_SYS_REG_H
-+#include <sys/reg.h>
-+#endif
-+
- #include <netinet/in.h> /* For ntohl/htonl */
- #include <endian.h>
-
-diff --git a/libddr_lzo.c b/libddr_lzo.c
-index 8d3983e..8c83c04 100644
---- a/libddr_lzo.c
-+++ b/libddr_lzo.c
-@@ -26,6 +26,9 @@
- #include <errno.h>
- #include <netinet/in.h>
- #include <sys/stat.h>
-+#ifdef HAVE_SYS_REG_H
-+#include <sys/reg.h>
-+#endif
- #include <signal.h>
- #include <lzo/lzo1x.h>
- #include <lzo/lzo1y.h>
-diff --git a/libddr_null.c b/libddr_null.c
-index 3f0f194..c379961 100644
---- a/libddr_null.c
-+++ b/libddr_null.c
-@@ -10,6 +10,9 @@
- #include "ddr_ctrl.h"
- #include <string.h>
- #include <stdlib.h>
-+#ifdef HAVE_SYS_REG_H
-+#include <sys/reg.h>
-+#endif
-
- /* fwd decl */
- extern ddr_plugin_t ddr_plug;
-diff --git a/sha512.h b/sha512.h
-index 4d08043..f54d371 100644
---- a/sha512.h
-+++ b/sha512.h
-@@ -3,6 +3,10 @@
-
- #include "hash.h"
-
-+#ifdef HAVE_SYS_REG_H
-+#include <sys/reg.h>
-+#endif
-+
- void sha512_init(hash_t *ctx);
- void sha384_init(hash_t *ctx);
- void sha512_128(const uint8_t* msg, hash_t* ctx);
---
-2.15.0
-