mips: add different value for SOCK_STREAM

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
This commit is contained in:
Petar Jovanovic 2013-04-04 10:55:09 +00:00
parent 4ee8c6feea
commit 21b4d03a6d
3 changed files with 20 additions and 1 deletions

View 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

View 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 ---*/

View 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
/*--------------------------------------------------------------------*/