]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
mips: add different value for SOCK_STREAM
authorPetar Jovanovic <mips32r2@gmail.com>
Thu, 4 Apr 2013 10:55:09 +0000 (10:55 +0000)
committerPetar Jovanovic <mips32r2@gmail.com>
Thu, 4 Apr 2013 10:55:09 +0000 (10:55 +0000)
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

include/vki/vki-linux.h
include/vki/vki-mips32-linux.h
include/vki/vki-mips64-linux.h

index 05d994bae76400a6e38d4d38cbacaeaa626dc637..c57cabd934a69acc50f915b7cc39db4c96f783c9 100644 (file)
@@ -588,10 +588,12 @@ typedef struct vki_sigevent {
 #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
index de0246cb2f58451ee18b816a8b0daeee7b072aec..ba85ad51277dbdfdf4faa11e2055158c84ff81ac 100644 (file)
@@ -964,8 +964,16 @@ typedef struct vki_siginfo {
 #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 ---*/
index 2b65fe50fcfeab2f561a7c26f8e2bd1ce088165a..11324eb79c849a43366da65cf66d984e73faf26c 100644 (file)
@@ -987,6 +987,15 @@ typedef struct vki_siginfo {
 #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
 
 /*--------------------------------------------------------------------*/