vcpkg/ports/libplist/004_fix_tools_msvc.patch
Weihang Ding d55379ba17
[libplist] Add tools feature (#33837)
* [libplist] Add tools feature

* Update version database

* Remove tools from default-features

* Update version database

* Optimize STDIN_FILENO macro in patch

* Update version database
2023-09-19 09:52:57 -07:00

19 lines
382 B
Diff

diff --git a/tools/plistutil.c b/tools/plistutil.c
index 8121a7d..98b440e 100644
--- a/tools/plistutil.c
+++ b/tools/plistutil.c
@@ -32,10 +32,13 @@
#include <string.h>
#include <sys/stat.h>
#include <errno.h>
+#ifndef _MSC_VER
#include <unistd.h>
+#endif
#ifdef _MSC_VER
#pragma warning(disable:4996)
+#define STDIN_FILENO _fileno(stdin)
#endif
typedef struct _options