diff options
| author | Long Nguyen <nguyen.long.908132@gmail.com> | 2021-05-29 00:09:56 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-28 10:09:56 -0700 |
| commit | a29126f785b1ace2b3ef9f600d4f3c8aed63cea2 (patch) | |
| tree | b2ff3afa84314817762a99650d6bcd90aca04077 /ports/libmagic/0015-MSYS2-Remove-ioctl-call.patch | |
| parent | 0de461216d66a4d5ca1870254e27258a66f6e361 (diff) | |
| download | vcpkg-a29126f785b1ace2b3ef9f600d4f3c8aed63cea2.tar.gz vcpkg-a29126f785b1ace2b3ef9f600d4f3c8aed63cea2.zip | |
[tre, libmagic] Windows + mingw support (#17769)
* [tre] mingw support
* [libmagic] Windows support
* [libmagic] Apply @Neumann-A suggestions
* [libmagic] Add host dependency
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
* [libmagic] Copy the magic file to the corresponding tools dir
* [ci baseline] libmagic now passes
* Update ports/libmagic/portfile.cmake
* [libmagic] Import patch from MSYS2
* [vcpkg baseline] Update libmagic, tre
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
Diffstat (limited to 'ports/libmagic/0015-MSYS2-Remove-ioctl-call.patch')
| -rw-r--r-- | ports/libmagic/0015-MSYS2-Remove-ioctl-call.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ports/libmagic/0015-MSYS2-Remove-ioctl-call.patch b/ports/libmagic/0015-MSYS2-Remove-ioctl-call.patch new file mode 100644 index 000000000..da8ef79df --- /dev/null +++ b/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 +@@ -378,7 +378,7 @@ + sread(int fd, void *buf, size_t n, int canbepipe __attribute__((__unused__))) + { + ssize_t rv; +-#ifdef FIONREAD ++#if defined(FIONREAD) && !defined(__MINGW32__) && !defined(WIN32) + int t = 0; + #endif + size_t rn = n; +@@ -386,7 +386,7 @@ + if (fd == STDIN_FILENO) + goto nocheck; + +-#ifdef FIONREAD ++#if defined(FIONREAD) && !defined(__MINGW32__) && !defined(WIN32) + if (canbepipe && (ioctl(fd, FIONREAD, &t) == -1 || t == 0)) { + #ifdef FD_ZERO + ssize_t cnt; |
