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

+#define _SEMAPHORE_H_
+
+#endif  // _SEMAPHORE_H_
diff -Naur ../newlib-2.5.0.20170922/newlib/libc/sys/enclave/include/sys/dirent.h ./newlib/libc/sys/enclave/include/sys/dirent.h
--- ../newlib-2.5.0.20170922/newlib/libc/sys/enclave/include/sys/dirent.h
+++ ./newlib/libc/sys/enclave/include/sys/dirent.h

+#endif
+
+#endif  // THIRD_PARTY_NEWLIB_SRC_LIBGLOSS_ENCLAVE_ENCLAVE_SYSCALLS_H_
diff -Naur ../newlib-2.5.0.20170922/libgloss/enclave/getauxval.c ./libgloss/enclave/getauxval.c
--- ../newlib-2.5.0.20170922/libgloss/enclave/getauxval.c
+++ ./libgloss/enclave/getauxval.c
@@ -0,0 +1,7 @@
+#include <sys/auxv.h>
+#include <errno.h>
+
+unsigned long getauxval(unsigned long item) {
+  errno = ENOSYS;
+  return -1;
+}
diff -Naur ../newlib-2.5.0.20170922/libgloss/enclave/Makefile.in ./libgloss/enclave/Makefile.in
--- ../newlib-2.5.0.20170922/libgloss/enclave/Makefile.in
+++ ./libgloss/enclave/Makefile.in
