aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libmagic/0007-Substitute-unistd-macros-for-MSVC.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/0007-Substitute-unistd-macros-for-MSVC.patch
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/libmagic/0007-Substitute-unistd-macros-for-MSVC.patch')
-rw-r--r--vcpkg/ports/libmagic/0007-Substitute-unistd-macros-for-MSVC.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/vcpkg/ports/libmagic/0007-Substitute-unistd-macros-for-MSVC.patch b/vcpkg/ports/libmagic/0007-Substitute-unistd-macros-for-MSVC.patch
new file mode 100644
index 0000000..726fbde
--- /dev/null
+++ b/vcpkg/ports/libmagic/0007-Substitute-unistd-macros-for-MSVC.patch
@@ -0,0 +1,30 @@
+From 1106d1523ed44bcbcca90fc1fe9fa9400777d8fe Mon Sep 17 00:00:00 2001
+From: Long Nguyen <nguyen.long.908132@gmail.com>
+Date: Sun, 9 May 2021 10:28:49 +0700
+Subject: [PATCH 07/14] Substitute unistd macros for MSVC
+
+---
+ src/file.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/file.h b/src/file.h
+index 4aa9f60..5da838c 100644
+--- a/src/file.h
++++ b/src/file.h
+@@ -85,6 +85,13 @@
+ #ifndef _WIN32
+ #include <sys/param.h>
+ #endif
++#ifdef _MSC_VER
++#include <io.h>
++#define R_OK 4
++#define W_OK 2
++#define X_OK R_OK
++#define F_OK 0
++#endif
+ /* Do this here and now, because struct stat gets re-defined on solaris */
+ #include <sys/stat.h>
+ #include <stdarg.h>
+--
+2.29.2.windows.2
+