mojo-ipcz: Implementation skeleton
This lays a foundation for a new Mojo Core implementation built upon
ipcz, including a new implementation of the Mojo Core ABI as well as
a new Chromium ipcz driver.
Mostly boilerplate, but some trivial APIs are implemented here too:
namely MojoClose and MojoGetTimeTicksNow for Mojo, and
GenerateRandomBytes for the ipcz driver.
Bug: 1299283
Change-Id: Iaa2bdb1db619d61a4564d3d2a1691a360e66d78c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3810673
Reviewed-by: Alex Gough <ajgo@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/main@{#1034199}
NOKEYCHECK=True
GitOrigin-RevId: 6daf45220223ab52d9435994d3aa5f92fc6f85cf
diff --git a/src/reference_drivers/random.cc b/src/reference_drivers/random.cc
index d2d0310..9131225 100644
--- a/src/reference_drivers/random.cc
+++ b/src/reference_drivers/random.cc
@@ -29,6 +29,7 @@
#if BUILDFLAG(IS_POSIX)
#include <fcntl.h>
+#include <unistd.h>
#endif
#if BUILDFLAG(IS_WIN)
@@ -97,6 +98,8 @@
} else {
RandomBytesFromDevUrandom(destination);
}
+#elif BUILDFLAG(IS_IOS)
+ RandomBytesFromDevUrandom(destination);
#elif BUILDFLAG(IS_NACL)
while (!destination.empty()) {
size_t nread;