summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-07 04:59:28 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-07 04:59:28 +0000
commit0b3b2f8421658194b3f27a94dd53a80d192cd5ba (patch)
treed2acdd00055201a80cb3fe837194abe91df1b57a
parentf9e201b908d1cb6b9d5198003af7dc42aea43700 (diff)
parent9c582385a4ea1a6aa22355ee3d1f203592b2e878 (diff)
downloadgatekeeper-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.bp14
-rw-r--r--OWNERS5
-rw-r--r--gatekeeper.cpp13
3 files changed, 26 insertions, 6 deletions
diff --git a/Android.bp b/Android.bp
index 340d4cf..a8be361 100644
--- a/Android.bp
+++ b/Android.bp
@@ -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
diff --git a/OWNERS b/OWNERS
index 335660d..04cd19e 100644
--- a/OWNERS
+++ b/OWNERS
@@ -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) {