[idevicerestore] Fix libgen.h cannot be found (#11074)

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
This commit is contained in:
NancyLi1013 2020-05-13 07:10:16 +08:00 committed by GitHub
parent faae10f77b
commit ba7450abdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 43 additions and 7 deletions

View File

@ -1,5 +1,5 @@
Source: idevicerestore
Version: 1.0.12-4
Description: Restore/upgrade firmware of iOS devices
Build-Depends: libimobiledevice, curl, libirecovery, libzip
Supports: !(windows)
Source: idevicerestore
Version: 1.0.12-4
Description: Restore/upgrade firmware of iOS devices
Build-Depends: libimobiledevice, curl, libirecovery, libzip
Supports: windows

View File

@ -0,0 +1,32 @@
diff --git a/src/common.c b/src/common.c
index afe1bc0..9219a8f 100644
--- a/src/common.c
+++ b/src/common.c
@@ -29,7 +29,9 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
+#ifndef _MSC_VER
#include <libgen.h>
+#endif
#include <time.h>
#include "common.h"
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index efa13c3..c17a2ba 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -38,12 +38,12 @@
#include <string.h>
#ifndef _MSC_VER
#include <unistd.h>
+#include <libgen.h>
#endif
#include <ctype.h>
#include <getopt.h>
#include <plist/plist.h>
#include <zlib.h>
-#include <libgen.h>
#include <curl/curl.h>

View File

@ -1,4 +1,4 @@
include(vcpkg_common_functions)
vcpkg_fail_port_install(ON_TARGET "linux" "osx")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
@ -6,7 +6,9 @@ vcpkg_from_github(
REF 1.0.12
SHA512 ba623be56c2f37853516d7d4c32e16f1ec72f33d512f18aa812ce6830af4b9e389f7af5321888dd0ddd168e282b652e379b60f90970680e213eabf489f406915
HEAD_REF msvc-master
PATCHES libcurl_d.patch
PATCHES
libcurl_d.patch
fix-libgen.h-cannot-be-found.patch
)
vcpkg_install_msbuild(

View File

@ -621,6 +621,8 @@ hypre:x64-osx=fail
icu:arm64-windows=fail
icu:arm-uwp=fail
icu:x64-uwp=fail
idevicerestore:x64-linux=fail
idevicerestore:x64-osx=fail
ignition-common1:x64-linux=fail
ignition-msgs1:arm64-windows=fail
ignition-msgs1:arm-uwp=fail