linux-mips
[Top] [All Lists]

socket.h patch (SOCK_XXX break glibc build)

To: linux-mips@linux-mips.org
Subject: socket.h patch (SOCK_XXX break glibc build)
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Tue, 26 Oct 2004 10:12:26 +0900 (JST)
Cc: ralf@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
On 2.6.9, SOCK_DGRAM, etc. in asm-mips/socket.h are visible from
userland.  It will break glibc build.  For other archs,
include/linux/net.h uses "#ifdef __KERNEL__" for SOCK_XXX definitions,
so asm-mips/socket.h should use "#ifdef __KERNEL__" too?


diff -u linux-mips/include/asm-mips/socket.h linux/include/asm-mips/
--- linux-mips/include/asm-mips/socket.h        Thu Oct 21 09:39:03 2004
+++ linux/include/asm-mips/socket.h     Mon Oct 25 22:06:43 2004
@@ -68,6 +68,8 @@
 
 #define SO_PEERSEC             30
 
+#ifdef __KERNEL__
+:
 /** sock_type - Socket types
  *
  * Please notice that for binary compat reasons MIPS has to
@@ -95,4 +97,6 @@
 
 #define ARCH_HAS_SOCKET_TYPES 1
 
+#endif /* __KERNEL__ */
+
 #endif /* _ASM_SOCKET_H */

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>