summaryrefslogtreecommitdiff
path: root/user/wimlib/header.patch
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2024-12-11 21:49:48 -0600
committerZach van Rijn <me@zv.io>2024-12-11 21:49:48 -0600
commit785213ed2a7d5a66061bddaeb7a1ad4e86c3ed9a (patch)
tree6d25eecddbe1b1f722ca584eef95e3ad42b6d6e2 /user/wimlib/header.patch
parentdd75bb185387a9f707fc994c0c4cfa2e5b1ad77a (diff)
downloadpackages-785213ed2a7d5a66061bddaeb7a1ad4e86c3ed9a.tar.gz
packages-785213ed2a7d5a66061bddaeb7a1ad4e86c3ed9a.tar.bz2
packages-785213ed2a7d5a66061bddaeb7a1ad4e86c3ed9a.tar.xz
packages-785213ed2a7d5a66061bddaeb7a1ad4e86c3ed9a.zip
user/wimlib: avoid linux headers
Diffstat (limited to 'user/wimlib/header.patch')
-rw-r--r--user/wimlib/header.patch31
1 files changed, 23 insertions, 8 deletions
diff --git a/user/wimlib/header.patch b/user/wimlib/header.patch
index cf6c32bc0..71255d446 100644
--- a/user/wimlib/header.patch
+++ b/user/wimlib/header.patch
@@ -1,14 +1,29 @@
-The RENAME_* flags are only exposed by <linux/fs.h> on musl systems. I have
-not yet been able to triage whether this is something that should be fixed
-musl-side or if this is an issue for upstream.
+This patch should be removed once the following musl commit lands:
---- wimlib-1.14.4/src/mount_image.c.old 2023-07-22 18:55:59.000000000 -0500
-+++ wimlib-1.14.4/src/mount_image.c 2024-12-11 18:46:19.018387960 -0600
-@@ -52,6 +52,7 @@
- #include <sys/time.h>
+https://git.musl-libc.org/cgit/musl/commit\
+/include/stdio.h?id=05ce67fea99ca09cd4b6625cff7aec9cc222dd5a
+
+These macros are also exposed via <linux/fs.h>.
+
+diff -ur a/src/mount_image.c b/src/mount_image.c
+--- a/src/mount_image.c 2024-12-11 21:13:37.806412788 -0600
++++ b/src/mount_image.c 2024-12-11 21:18:32.528640110 -0600
+@@ -53,6 +53,18 @@
#include <unistd.h>
#include <utime.h>
-+#include <linux/fs.h>
++#if defined(_GNU_SOURCE)
++#ifndef RENAME_NOREPLACE
++#define RENAME_NOREPLACE (1 << 0)
++#endif
++#ifndef RENAME_EXCHANGE
++#define RENAME_EXCHANGE (1 << 1)
++#endif
++#ifndef RENAME_WHITEOUT
++#define RENAME_WHITEOUT (1 << 2)
++#endif
++#endif
++
#include "wimlib/blob_table.h"
#include "wimlib/dentry.h"
+ #include "wimlib/encoding.h"