From 3b1160334fa7c005fbde5af8fa12a991cd7ccbcd Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Wed, 15 Sep 2004 10:58:53 -0300 Subject: [SOCKET] make enum socket_type be arch overridable To cope with MIPS, that has SOCK_STREAM and SOCK_DGRAM values swapped to deal with binary compat. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ralf Baechle Signed-off-by: David S. Miller --- include/linux/net.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/linux/net.h') diff --git a/include/linux/net.h b/include/linux/net.h index 0f710b7e4121..2c4572f630a1 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -21,6 +21,7 @@ #include #include #include +#include struct poll_table_struct; struct inode; @@ -61,8 +62,13 @@ typedef enum { #define SOCK_ASYNC_WAITDATA 1 #define SOCK_NOSPACE 2 +#ifndef ARCH_HAS_SOCKET_TYPES /** sock_type - Socket types - * + * + * When adding some new socket type please + * grep ARCH_HAS_SOCKET_TYPE include/asm-* /socket.h, at least MIPS + * overrides this enum for binary compat reasons. + * * @SOCK_STREAM - stream (connection) socket * @SOCK_DGRAM - datagram (conn.less) socket * @SOCK_RAW - raw socket @@ -82,6 +88,8 @@ enum sock_type { #define SOCK_MAX (SOCK_PACKET + 1) +#endif /* ARCH_HAS_SOCKET_TYPES */ + /** * struct socket - general BSD socket * @state - socket state (%SS_CONNECTED, etc) -- cgit v1.2.3