Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

alpha: Don't export SOCK_NONBLOCK to user space.

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>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Michael Cree and committed by
Linus Torvalds
a2fa3ccd 0d7614f0

+2
+2
arch/alpha/include/asm/socket.h
··· 76 76 /* Instruct lower device to use last 4-bytes of skb data as FCS */ 77 77 #define SO_NOFCS 43 78 78 79 + #ifdef __KERNEL__ 79 80 /* O_NONBLOCK clashes with the bits used for socket types. Therefore we 80 81 * have to define SOCK_NONBLOCK to a different value here. 81 82 */ 82 83 #define SOCK_NONBLOCK 0x40000000 84 + #endif /* __KERNEL__ */ 83 85 84 86 #endif /* _ASM_SOCKET_H */