]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
alpha: Don't export SOCK_NONBLOCK to user space.
authorMichael Cree <mcree@orcon.net.nz>
Sun, 19 Aug 2012 02:40:56 +0000 (14:40 +1200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 12 Sep 2012 02:37:14 +0000 (03:37 +0100)
commit a2fa3ccd7b43665fe14cb562761a6c3d26a1d13f upstream.

Currently we export SOCK_NONBLOCK to user space but that conflicts with
the definition from glibc leading to compilation errors in user programs
(e.g.  see Debian bug #658460).

The generic socket.h restricts the definition of SOCK_NONBLOCK to the
kernel, as does the MIPS specific socket.h, so let's do the same on
Alpha.

Signed-off-by: Michael Cree <mcree@orcon.net.nz>
Acked-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/alpha/include/asm/socket.h

index 06edfefc337332915833c7141fac17f2b1a60bba..3eeb47c501899b4d34b0b5fb93bda49e4df5a9ef 100644 (file)
 
 #define SO_RXQ_OVFL             40
 
+#ifdef __KERNEL__
 /* O_NONBLOCK clashes with the bits used for socket types.  Therefore we
  * have to define SOCK_NONBLOCK to a different value here.
  */
 #define SOCK_NONBLOCK  0x40000000
+#endif /* __KERNEL__ */
 
 #endif /* _ASM_SOCKET_H */