MIPS uses different values for socket types.
This is protected by ARCH_HAS_SOCKET_TYPES in Linux kernel and we introduce
it here too. This is important for log-socket feature, and it resolves the
issue reported in https://bugs.kde.org/show_bug.cgi?id=313267#c21.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13359
#define VKI_SYS_RECVMSG 17 /* sys_recvmsg(2) */
#define VKI_SYS_ACCEPT4 18 /* sys_accept4(2) */
+#ifndef ARCH_HAS_SOCKET_TYPES
enum vki_sock_type {
VKI_SOCK_STREAM = 1,
// [[others omitted]]
};
+#endif /* ARCH_HAS_SOCKET_TYPES */
//----------------------------------------------------------------------
// From linux-2.6.8.1/include/linux/uio.h
#define VKI_BRK_OVERFLOW 6 /* Overflow check */
#define VKI_BRK_DIVZERO 7 /* Divide by zero check */
-#endif // __VKI_MIPS32_LINUX_H
+//----------------------------------------------------------------------
+// From linux-3.6.35.5/arch/mips/include/socket.h
+//----------------------------------------------------------------------
+enum vki_sock_type {
+ VKI_SOCK_STREAM = 2,
+ // [[others omitted]]
+};
+#define ARCH_HAS_SOCKET_TYPES 1
+#endif // __VKI_MIPS32_LINUX_H
/*--------------------------------------------------------------------*/
/*--- end vki-mips32-linux.h ---*/
#define VKI_BRK_OVERFLOW 6 /* Overflow check */
#define VKI_BRK_DIVZERO 7 /* Divide by zero check */
+//----------------------------------------------------------------------
+// From linux-3.6.35.5/arch/mips/include/socket.h
+//----------------------------------------------------------------------
+enum vki_sock_type {
+ VKI_SOCK_STREAM = 2,
+ // [[others omitted]]
+};
+#define ARCH_HAS_SOCKET_TYPES 1
+
#endif // __VKI_MIPS64_LINUX_H
/*--------------------------------------------------------------------*/