 +	else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
 +
 +# object files needed
-+OBJS = enclave.o mman.o xattr.o getauxval.o
++OBJS = enclave.o mman.o xattr.o getauxval.o syscall.o
 +
 +# Object files specific to particular targets.
 +EVALOBJS = ${OBJS}

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

 #ifdef __cplusplus
 }
 #endif
diff -Naur ../newlib-2.5.0.20170922/newlib/libc/include/unistd.h ./newlib/libc/include/unistd.h
--- ../newlib-2.5.0.20170922/newlib/libc/include/unistd.h
+++ ./newlib/libc/include/unistd.h
@@ -1,6 +1,8 @@
 #ifndef _UNISTD_H_
 #define _UNISTD_H_
 
-# include <sys/unistd.h>
+#include <sys/unistd.h>
+
+extern long int syscall(long int sys_no, ...);
 
 #endif /* _UNISTD_H_ */
diff -Naur ../newlib-2.5.0.20170922/newlib/libc/locale/lctype.c ./newlib/libc/locale/lctype.c
--- ../newlib-2.5.0.20170922/newlib/libc/locale/lctype.c
+++ ./newlib/libc/locale/lctype.c
