 +}
 +
 +int mincore(void *addr, size_t len, unsigned char *vec) {
++  errno = ENOSYS;
++  return -1;
++}
+diff -Naur ../newlib-2.5.0.20170922/libgloss/enclave/syscall.c ./libgloss/enclave/syscall.c
+--- ../newlib-2.5.0.20170922/libgloss/enclave/syscall.c
++++ ./libgloss/enclave/syscall.c
+@@ -0,0 +1,7 @@
++#include <errno.h>
++#include <unistd.h>
++
++long int syscall(long int sys_no, ...) {
 +  errno = ENOSYS;
 +  return -1;
 +}

 #ifdef __cplusplus
 }
 #endif
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

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