aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libmagic/0015-MSYS2-Remove-ioctl-call.patch
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/libmagic/0015-MSYS2-Remove-ioctl-call.patch
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/libmagic/0015-MSYS2-Remove-ioctl-call.patch')
-rw-r--r--vcpkg/ports/libmagic/0015-MSYS2-Remove-ioctl-call.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/vcpkg/ports/libmagic/0015-MSYS2-Remove-ioctl-call.patch b/vcpkg/ports/libmagic/0015-MSYS2-Remove-ioctl-call.patch
new file mode 100644
index 0000000..13fe3cf
--- /dev/null
+++ b/vcpkg/ports/libmagic/0015-MSYS2-Remove-ioctl-call.patch
@@ -0,0 +1,27 @@
+# From https://github.com/msys2/MINGW-packages/commit/3a51faadb8bacf06c7b7fd84b2ea80775d1a8b0d
+
+# this is an advanced patch to fix building v5.38
+# see for details
+# this patch should be removed with the next version
+diff --git a/src/compress.c b/src/compress.c
+index 33ce2bc..f172eda 100644
+--- a/src/compress.c
++++ b/src/compress.c
+@@ -407,7 +407,7 @@
+ sread(int fd, void *buf, size_t n, int canbepipe __attribute__((__unused__)))
+ {
+ ssize_t rv;
+-#if defined(FIONREAD) && !defined(__MINGW32__)
++#if defined(FIONREAD) && !defined(__MINGW32__) && !defined(WIN32)
+ int t = 0;
+ #endif
+ size_t rn = n;
+@@ -418,7 +418,7 @@
+ if (fd == STDIN_FILENO)
+ goto nocheck;
+
+-#if defined(FIONREAD) && !defined(__MINGW32__)
++#if defined(FIONREAD) && !defined(__MINGW32__) && !defined(WIN32)
+ if (canbepipe && (ioctl(fd, FIONREAD, &t) == -1 || t == 0)) {
+ #ifdef FD_ZERO
+ ssize_t cnt;