 +typedef struct { unsigned char _dummy; } pthread_rwlockattr_t;
 +
 +#endif  // _SYS__PTHREADTYPES_H
+diff -Naur ../newlib-2.5.0.20170922/newlib/libc/sys/enclave/include/sys/socket.h ./newlib/libc/sys/enclave/include/sys/socket.h
+--- ../newlib-2.5.0.20170922/newlib/libc/sys/enclave/include/sys/socket.h
++++ ./newlib/libc/sys/enclave/include/sys/socket.h
+@@ -0,0 +1,4 @@
++#ifndef _SYS_SOCKET_H_
++#define _SYS_SOCKET_H_
++
++#endif  // _SYS_SOCKET_H_
 diff -Naur ../newlib-2.5.0.20170922/newlib/libc/sys/enclave/include/sys/_statfs.h ./newlib/libc/sys/enclave/include/sys/_statfs.h
 --- ../newlib-2.5.0.20170922/newlib/libc/sys/enclave/include/sys/_statfs.h
 +++ ./newlib/libc/sys/enclave/include/sys/_statfs.h

+#include <string.h>
+
+#endif  // _MEMORY_H
diff -Naur ../newlib-2.5.0.20170922/newlib/libc/sys/enclave/include/_newlib_version.h ./newlib/libc/sys/enclave/include/_newlib_version.h
--- ../newlib-2.5.0.20170922/newlib/libc/sys/enclave/include/_newlib_version.h
+++ ./newlib/libc/sys/enclave/include/_newlib_version.h

+#endif
+
+#endif  // _SYS_MMAN_H_
diff -Naur ../newlib-2.5.0.20170922/newlib/libc/sys/enclave/include/sys/poll.h ./newlib/libc/sys/enclave/include/sys/poll.h
--- ../newlib-2.5.0.20170922/newlib/libc/sys/enclave/include/sys/poll.h
+++ ./newlib/libc/sys/enclave/include/sys/poll.h
@@ -0,0 +1,4 @@
+#ifndef _SYS_POLL_H_
+#define _SYS_POLL_H_
+
+#endif  // _SYS_POLL_H_
diff -Naur ../newlib-2.5.0.20170922/newlib/libc/sys/enclave/include/sys/_pthreadtypes.h ./newlib/libc/sys/enclave/include/sys/_pthreadtypes.h
--- ../newlib-2.5.0.20170922/newlib/libc/sys/enclave/include/sys/_pthreadtypes.h
+++ ./newlib/libc/sys/enclave/include/sys/_pthreadtypes.h
