mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-29 11:41:36 +08:00
[sqlite3-tool]Fix build error on arm/uwp platform. (#7202)
This commit is contained in:
parent
164dc9e4b1
commit
e1870a91ff
@ -36,7 +36,6 @@ endif()
|
|||||||
|
|
||||||
if(NOT SQLITE3_SKIP_TOOLS)
|
if(NOT SQLITE3_SKIP_TOOLS)
|
||||||
add_executable(sqlite3-bin shell.c)
|
add_executable(sqlite3-bin shell.c)
|
||||||
set_target_properties(sqlite3-bin PROPERTIES OUTPUT_NAME sqlite3)
|
|
||||||
target_link_libraries(sqlite3-bin PRIVATE sqlite3)
|
target_link_libraries(sqlite3-bin PRIVATE sqlite3)
|
||||||
install(TARGETS sqlite3-bin sqlite3
|
install(TARGETS sqlite3-bin sqlite3
|
||||||
RUNTIME DESTINATION tools
|
RUNTIME DESTINATION tools
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Source: sqlite3
|
Source: sqlite3
|
||||||
Version: 3.28.0-1
|
Version: 3.28.0-2
|
||||||
Homepage: https://sqlite.org/
|
Homepage: https://sqlite.org/
|
||||||
Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.
|
Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.
|
||||||
|
|
||||||
|
33
ports/sqlite3/fix-arm-uwp.patch
Normal file
33
ports/sqlite3/fix-arm-uwp.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
diff --git a/shell.c b/shell.c
|
||||||
|
index 10d8cc1..99f37a5 100644
|
||||||
|
--- a/shell.c
|
||||||
|
+++ b/shell.c
|
||||||
|
@@ -316,7 +316,11 @@ static int hasTimer(void){
|
||||||
|
*/
|
||||||
|
hProcess = GetCurrentProcess();
|
||||||
|
if( hProcess ){
|
||||||
|
+#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
|
||||||
|
HINSTANCE hinstLib = LoadLibrary(TEXT("Kernel32.dll"));
|
||||||
|
+#else
|
||||||
|
+ HINSTANCE hinstLib = LoadPackagedLibrary(TEXT("Kernel32.dll"), 0);
|
||||||
|
+#endif
|
||||||
|
if( NULL != hinstLib ){
|
||||||
|
getProcessTimesAddr =
|
||||||
|
(GETPROCTIMES) GetProcAddress(hinstLib, "GetProcessTimes");
|
||||||
|
@@ -2437,10 +2441,16 @@ static int writeFile(
|
||||||
|
if( zUnicodeName==0 ){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
+#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
|
||||||
|
hFile = CreateFileW(
|
||||||
|
zUnicodeName, FILE_WRITE_ATTRIBUTES, 0, NULL, OPEN_EXISTING,
|
||||||
|
FILE_FLAG_BACKUP_SEMANTICS, NULL
|
||||||
|
);
|
||||||
|
+#else
|
||||||
|
+ hFile = CreateFile2(
|
||||||
|
+ zUnicodeName, FILE_WRITE_ATTRIBUTES, 0, OPEN_EXISTING, NULL
|
||||||
|
+ );
|
||||||
|
+#endif
|
||||||
|
sqlite3_free(zUnicodeName);
|
||||||
|
if( hFile!=INVALID_HANDLE_VALUE ){
|
||||||
|
BOOL bResult = SetFileTime(hFile, NULL, &lastAccess, &lastWrite);
|
@ -13,6 +13,7 @@ vcpkg_extract_source_archive_ex(
|
|||||||
OUT_SOURCE_PATH SOURCE_PATH
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
ARCHIVE ${ARCHIVE}
|
ARCHIVE ${ARCHIVE}
|
||||||
REF ${SQLITE_VERSION}
|
REF ${SQLITE_VERSION}
|
||||||
|
PATCHES fix-arm-uwp.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user