 +
 +// Advice to 'madvise'.
 +#ifdef _DEFAULT_SOURCE
-+# define MADV_NOHUGEPAGE  15
++#define MADV_NOHUGEPAGE 15
 +#endif
 +
 +void *mmap(void *addr, size_t length, int prot, int flags, int fd,

+int mlockall(int flags);
+int munlockall(void);
+int mprotect(void *addr, size_t len, int prot);
+
+#ifdef __cplusplus
+}  // extern "C"

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
