 +
 +#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/libgloss/enclave/mman.c ./libgloss/enclave/mman.c
--- ../newlib-2.5.0.20170922/libgloss/enclave/mman.c
+++ ./libgloss/enclave/mman.c
@@ -0,0 +1,108 @@
+/*
+ *
+ * Copyright 2018 Asylo authors

+}
+
+int madvise(void *addr, size_t len, int advice) {
+  errno = ENOSYS;
+  return -1;
+}
+
+int mincore(void *addr, size_t len, unsigned char *vec) {
+  errno = ENOSYS;
+  return -1;
+}
