-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mongo-c-driver] Fix UWP builds. Deploy THIRD_PARTY_NOTICES.
- Loading branch information
1 parent
3839b44
commit 0163b19
Showing
3 changed files
with
59 additions
and
3 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Source: mongo-c-driver | ||
Version: 1.5.1 | ||
Build-Depends: libbson | ||
Version: 1.5.1-1 | ||
Build-Depends: libbson, openssl [uwp] | ||
Description: Client library written in C for MongoDB. |
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,44 @@ | ||
diff --git a/src/mongoc/mongoc-gridfs-file.c b/src/mongoc/mongoc-gridfs-file.c | ||
index 5beb610..7e74ff7 100644 | ||
--- a/src/mongoc/mongoc-gridfs-file.c | ||
+++ b/src/mongoc/mongoc-gridfs-file.c | ||
@@ -734,7 +734,7 @@ _mongoc_gridfs_file_refresh_page (mongoc_gridfs_file_t *file) | ||
bson_t query; | ||
bson_t child; | ||
bson_t opts; | ||
- const bson_t *chunk; | ||
+ const bson_t *chunk = 0; | ||
const char *key; | ||
bson_iter_t iter; | ||
int64_t existing_chunks; | ||
diff --git a/src/mongoc/mongoc-handshake.c b/src/mongoc/mongoc-handshake.c | ||
index 4e181bd..b274fc1 100644 | ||
--- a/src/mongoc/mongoc-handshake.c | ||
+++ b/src/mongoc/mongoc-handshake.c | ||
@@ -195,7 +195,8 @@ _get_os_version (void) | ||
char *ret = bson_malloc (HANDSHAKE_OS_VERSION_MAX); | ||
bool found = false; | ||
|
||
-#ifdef _WIN32 | ||
+#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) | ||
+#elif defined (_WIN32) | ||
OSVERSIONINFO osvi; | ||
ZeroMemory (&osvi, sizeof (OSVERSIONINFO)); | ||
osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); | ||
diff --git a/src/mongoc/mongoc-util.c b/src/mongoc/mongoc-util.c | ||
index 6dbb26d..7f33780 100644 | ||
--- a/src/mongoc/mongoc-util.c | ||
+++ b/src/mongoc/mongoc-util.c | ||
@@ -46,7 +46,11 @@ _mongoc_hex_md5 (const char *input) | ||
void | ||
_mongoc_usleep (int64_t usec) | ||
{ | ||
-#ifdef _WIN32 | ||
+#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) | ||
+ if (usec / 1000 > MAXDWORD || usec < 0) | ||
+ __fastfail(-1); | ||
+ Sleep((DWORD)(usec / 1000)); | ||
+#elif defined(_WIN32) | ||
LARGE_INTEGER ft; | ||
HANDLE timer; | ||
|
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