diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 04:59:28 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 04:59:28 +0000 |
commit | 0b3b2f8421658194b3f27a94dd53a80d192cd5ba (patch) | |
tree | d2acdd00055201a80cb3fe837194abe91df1b57a | |
parent | f9e201b908d1cb6b9d5198003af7dc42aea43700 (diff) | |
parent | 9c582385a4ea1a6aa22355ee3d1f203592b2e878 (diff) | |
download | gatekeeper-0b3b2f8421658194b3f27a94dd53a80d192cd5ba.tar.gz |
Snap for 10453563 from 9c582385a4ea1a6aa22355ee3d1f203592b2e878 to mainline-documentsui-releaseaml_doc_341713000aml_doc_341610010aml_doc_341510050aml_doc_341312010aml_doc_341112000aml_doc_341012000aml_doc_340916000
Change-Id: I383dc476de5e36f331315e1088659e2597e99a18
-rw-r--r-- | Android.bp | 14 | ||||
-rw-r--r-- | OWNERS | 5 | ||||
-rw-r--r-- | gatekeeper.cpp | 13 |
3 files changed, 26 insertions, 6 deletions
@@ -33,17 +33,21 @@ cc_library_shared { "-Wall", "-Werror", "-g", + "-fno-sanitize-coverage=edge,indirect-calls,8bit-counters,trace-cmp", ], header_libs: [ "libhardware_headers", ], - + target: { + windows: { + enabled: true, + host_ldlibs: [ + "-lws2_32", + ], + }, + }, export_include_dirs: ["include"], - // TODO(krasin): reenable coverage flags, when the new Clang toolchain is released. - // Currently, if enabled, these flags will cause an internal error in Clang. - // Bug: 25119481 - clang_cflags: ["-fno-sanitize-coverage=edge,indirect-calls,8bit-counters,trace-cmp"], } // libgatekeeper_static is an empty static library that exports @@ -1,2 +1,5 @@ -jdanis@google.com +# Bug component: 1124862 +drysdale@google.com +oarbildo@google.com +subrahmanyaman@google.com swillden@google.com diff --git a/gatekeeper.cpp b/gatekeeper.cpp index 57be100..cc6b1a3 100644 --- a/gatekeeper.cpp +++ b/gatekeeper.cpp @@ -16,11 +16,24 @@ #include <gatekeeper/UniquePtr.h> #include <gatekeeper/gatekeeper.h> +#ifdef _WIN32 +#include <winsock2.h> +#define htobe32 htonl +#define htobe64 htonll_gk +#else #include <endian.h> +#endif + #include <stddef.h> #define DAY_IN_MS (1000 * 60 * 60 * 24) +#ifdef _WIN32 +__forceinline uint64_t htonll_gk(uint64_t value) { + return (((uint64_t)htonl(value & 0xFFFFFFFFUL)) << 32) | htonl((uint32_t)(value >> 32)); +} +#endif + namespace gatekeeper { void GateKeeper::Enroll(const EnrollRequest &request, EnrollResponse *response) { |