 +
 +#ifdef _DEFAULT_SOURCE
 +int madvise(void *addr, size_t len, int advice);
++int mincore(void *addr, size_t len, unsigned char *vec);
 +#endif
 +
 +#ifdef __cplusplus

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

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,113 @@
+/*
+ *
+ * Copyright 2018 Asylo authors
