forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libusbmuxd] Add tools feature (microsoft#33838)
* [libusbmuxd] Add tools feature * Update version database * Remove tools from default-features * Update version database
- Loading branch information
Showing
6 changed files
with
108 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
diff --git a/tools/inetcat.c b/tools/inetcat.c | ||
index f70215b..748db15 100644 | ||
--- a/tools/inetcat.c | ||
+++ b/tools/inetcat.c | ||
@@ -33,7 +33,9 @@ | ||
#include <string.h> | ||
#include <fcntl.h> | ||
#include <stddef.h> | ||
+#ifndef _MSC_VER | ||
#include <unistd.h> | ||
+#endif | ||
#include <errno.h> | ||
#include <getopt.h> | ||
#ifdef WIN32 | ||
@@ -50,6 +52,13 @@ | ||
#include "usbmuxd.h" | ||
#include <libimobiledevice-glue/socket.h> | ||
|
||
+#ifdef _MSC_VER | ||
+#include <BaseTsd.h> | ||
+typedef SSIZE_T ssize_t; | ||
+#define STDIN_FILENO _fileno(stdin) | ||
+#define STDOUT_FILENO _fileno(stdout) | ||
+#endif | ||
+ | ||
static int debug_level = 0; | ||
|
||
static size_t read_data_socket(int fd, uint8_t* buf, size_t bufsize) | ||
diff --git a/tools/iproxy.c b/tools/iproxy.c | ||
index d5f66b6..6510cb8 100644 | ||
--- a/tools/iproxy.c | ||
+++ b/tools/iproxy.c | ||
@@ -34,7 +34,9 @@ | ||
#include <string.h> | ||
#include <fcntl.h> | ||
#include <stddef.h> | ||
+#ifndef _MSC_VER | ||
#include <unistd.h> | ||
+#endif | ||
#include <errno.h> | ||
#include <getopt.h> | ||
#ifdef WIN32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters