 diff -Naur ../newlib-2.5.0.20170922/libgloss/enclave/mman.c ./libgloss/enclave/mman.c
 --- ../newlib-2.5.0.20170922/libgloss/enclave/mman.c
 +++ ./libgloss/enclave/mman.c
-@@ -0,0 +1,103 @@
+@@ -0,0 +1,108 @@
 +/*
 + *
 + * Copyright 2018 Asylo authors

+// mprotect is weak to allow an optional definition with Intel's trts_mprotect.
+__attribute__((weak))
+int mprotect(void *addr, size_t len, int prot) {
+  errno = ENOSYS;
+  return -1;
+}

diff -Naur ../newlib-2.5.0.20170922/newlib/libc/sys/enclave/include/sys/mman.h ./newlib/libc/sys/enclave/include/sys/mman.h
--- ../newlib-2.5.0.20170922/newlib/libc/sys/enclave/include/sys/mman.h
+++ ./newlib/libc/sys/enclave/include/sys/mman.h
@@ -0,0 +1,77 @@
+/*
+ *
+ * Copyright 2018 Asylo authors
