diff --git a/linux-user/alpha/sockbits.h b/linux-user/alpha/sockbits.h
index 768579a1f7..defdb806ea 100644
--- a/linux-user/alpha/sockbits.h
+++ b/linux-user/alpha/sockbits.h
@@ -66,39 +66,3 @@
 #define TARGET_SCM_TIMESTAMPING_PKTINFO         58
 #define TARGET_SO_PEERGROUPS                    59
 #define TARGET_SO_ZEROCOPY                      60
-
-/** sock_type - Socket types
- *
- * Please notice that for binary compat reasons ALPHA has to
- * override the enum sock_type in include/linux/net.h, so
- * we define ARCH_HAS_SOCKET_TYPES here.
- *
- * @SOCK_STREAM - stream (connection) socket
- * @SOCK_DGRAM - datagram (conn.less) socket
- * @SOCK_RAW - raw socket
- * @SOCK_RDM - reliably-delivered message
- * @SOCK_SEQPACKET - sequential packet socket
- * @SOCK_DCCP - Datagram Congestion Control Protocol socket
- * @SOCK_PACKET - linux specific way of getting packets at the dev level.
- *                For writing rarp and other similar things on the user
- *                level.
- * @SOCK_CLOEXEC - sets the close-on-exec (FD_CLOEXEC) flag.
- * @SOCK_NONBLOCK - sets the O_NONBLOCK file status flag.
- */
-
-enum sock_type {
-    TARGET_SOCK_STREAM      = 1,
-    TARGET_SOCK_DGRAM       = 2,
-    TARGET_SOCK_RAW         = 3,
-    TARGET_SOCK_RDM         = 4,
-    TARGET_SOCK_SEQPACKET   = 5,
-    TARGET_SOCK_DCCP        = 6,
-    TARGET_SOCK_PACKET      = 10,
-    TARGET_SOCK_CLOEXEC     = 010000000,
-    TARGET_SOCK_NONBLOCK    = 0x40000000,
-};
-
-#define TARGET_SOCK_MAX (TARGET_SOCK_PACKET + 1)
-#define TARGET_SOCK_TYPE_MASK 0xf  /* Covers up to TARGET_SOCK_MAX - 1. */
-
-#define ARCH_HAS_SOCKET_TYPES 1
diff --git a/linux-user/hppa/sockbits.h b/linux-user/hppa/sockbits.h
index 3dab31a76a..32f81357d6 100644
--- a/linux-user/hppa/sockbits.h
+++ b/linux-user/hppa/sockbits.h
@@ -71,33 +71,3 @@
 #define TARGET_SO_PEERGROUPS                    0x4034
 #define TARGET_SO_ZEROCOPY                      0x4035
 
-/** sock_type - Socket types - default values
- *
- * @SOCK_STREAM - stream (connection) socket
- * @SOCK_DGRAM - datagram (conn.less) socket
- * @SOCK_RAW - raw socket
- * @SOCK_RDM - reliably-delivered message
- * @SOCK_SEQPACKET - sequential packet socket
- * @SOCK_DCCP - Datagram Congestion Control Protocol socket
- * @SOCK_PACKET - linux specific way of getting packets at the dev level.
- *                For writing rarp and other similar things on the user
- *                level.
- * @SOCK_CLOEXEC - sets the close-on-exec (FD_CLOEXEC) flag.
- * @SOCK_NONBLOCK - sets the O_NONBLOCK file status flag.
- */
-enum sock_type {
-    TARGET_SOCK_STREAM    = 1,
-    TARGET_SOCK_DGRAM     = 2,
-    TARGET_SOCK_RAW       = 3,
-    TARGET_SOCK_RDM       = 4,
-    TARGET_SOCK_SEQPACKET = 5,
-    TARGET_SOCK_DCCP      = 6,
-    TARGET_SOCK_PACKET    = 10,
-    TARGET_SOCK_CLOEXEC   = 010000000,
-    TARGET_SOCK_NONBLOCK  = 0x40000000,
-};
-
-#define TARGET_SOCK_MAX (TARGET_SOCK_PACKET + 1)
-#define TARGET_SOCK_TYPE_MASK 0xf  /* Covers up to TARGET_SOCK_MAX - 1. */
-
-#define ARCH_HAS_SOCKET_TYPES 1
diff --git a/linux-user/mips/sockbits.h b/linux-user/mips/sockbits.h
index 6d8ea8aba2..fa8062391d 100644
--- a/linux-user/mips/sockbits.h
+++ b/linux-user/mips/sockbits.h
@@ -70,38 +70,3 @@
 #define TARGET_SCM_TIMESTAMPING_PKTINFO         58
 #define TARGET_SO_PEERGROUPS                    59
 #define TARGET_SO_ZEROCOPY                      60
-
-/** sock_type - Socket types
- *
- * Please notice that for binary compat reasons MIPS has to
- * override the enum sock_type in include/linux/net.h, so
- * we define ARCH_HAS_SOCKET_TYPES here.
- *
- * @SOCK_DGRAM - datagram (conn.less) socket
- * @SOCK_STREAM - stream (connection) socket
- * @SOCK_RAW - raw socket
- * @SOCK_RDM - reliably-delivered message
- * @SOCK_SEQPACKET - sequential packet socket
- * @SOCK_DCCP - Datagram Congestion Control Protocol socket
- * @SOCK_PACKET - linux specific way of getting packets at the dev level.
- *                For writing rarp and other similar things on the user
- *                level.
- * @SOCK_CLOEXEC - sets the close-on-exec (FD_CLOEXEC) flag.
- * @SOCK_NONBLOCK - sets the O_NONBLOCK file status flag.
- */
-enum sock_type {
-    TARGET_SOCK_DGRAM       = 1,
-    TARGET_SOCK_STREAM      = 2,
-    TARGET_SOCK_RAW         = 3,
-    TARGET_SOCK_RDM         = 4,
-    TARGET_SOCK_SEQPACKET   = 5,
-    TARGET_SOCK_DCCP        = 6,
-    TARGET_SOCK_PACKET      = 10,
-    TARGET_SOCK_CLOEXEC     = 02000000,
-    TARGET_SOCK_NONBLOCK    = 0x0080,
-};
-
-#define TARGET_SOCK_MAX (TARGET_SOCK_PACKET + 1)
-#define TARGET_SOCK_TYPE_MASK 0xf  /* Covers up to TARGET_SOCK_MAX - 1. */
-
-#define ARCH_HAS_SOCKET_TYPES 1
diff --git a/linux-user/socket.h b/linux-user/socket.h
index 6f49255b5f..8f21843d14 100644
--- a/linux-user/socket.h
+++ b/linux-user/socket.h
@@ -103,34 +103,34 @@
 
 #endif
 
-#ifndef ARCH_HAS_SOCKET_TYPES
-    /** sock_type - Socket types - default values
-     *
-     * @SOCK_STREAM - stream (connection) socket
-     * @SOCK_DGRAM - datagram (conn.less) socket
-     * @SOCK_RAW - raw socket
-     * @SOCK_RDM - reliably-delivered message
-     * @SOCK_SEQPACKET - sequential packet socket
-     * @SOCK_DCCP - Datagram Congestion Control Protocol socket
-     * @SOCK_PACKET - linux specific way of getting packets at the dev level.
-     *                For writing rarp and other similar things on the user
-     *                level.
-     * @SOCK_CLOEXEC - sets the close-on-exec (FD_CLOEXEC) flag.
-     * @SOCK_NONBLOCK - sets the O_NONBLOCK file status flag.
-     */
-    enum sock_type {
-           TARGET_SOCK_STREAM      = 1,
-           TARGET_SOCK_DGRAM       = 2,
-           TARGET_SOCK_RAW         = 3,
-           TARGET_SOCK_RDM         = 4,
-           TARGET_SOCK_SEQPACKET   = 5,
-           TARGET_SOCK_DCCP        = 6,
-           TARGET_SOCK_PACKET      = 10,
-           TARGET_SOCK_CLOEXEC     = 02000000,
-           TARGET_SOCK_NONBLOCK    = 04000,
-    };
-
-    #define TARGET_SOCK_MAX (TARGET_SOCK_PACKET + 1)
-    #define TARGET_SOCK_TYPE_MASK  0xf  /* Covers up to TARGET_SOCK_MAX - 1. */
+#if defined(TARGET_MIPS)
+    #define TARGET_SOCK_DGRAM  1
+    #define TARGET_SOCK_STREAM 2
+#else
+    #define TARGET_SOCK_STREAM 1
+    #define TARGET_SOCK_DGRAM  2
+#endif
 
+#define TARGET_SOCK_RAW        3
+#define TARGET_SOCK_RDM        4
+#define TARGET_SOCK_SEQPACKET  5
+#define TARGET_SOCK_DCCP       6
+#define TARGET_SOCK_PACKET     10
+
+#if defined(TARGET_ALPHA) || defined(TARGET_HPPA)
+    #define TARGET_SOCK_CLOEXEC  010000000
+#else
+    #define TARGET_SOCK_CLOEXEC  02000000 /* 0x400000 */
 #endif
+
+#if defined(TARGET_MIPS)
+    #define TARGET_SOCK_NONBLOCK 0x0080
+#elif defined(TARGET_SPARC)
+    #define TARGET_SOCK_NONBLOCK 0x4000
+#elif defined(TARGET_ALPHA) || defined(TARGET_HPPA)
+    #define TARGET_SOCK_NONBLOCK 0x40000000
+#else
+    #define TARGET_SOCK_NONBLOCK 04000
+#endif
+
+#define TARGET_SOCK_TYPE_MASK  0xf
diff --git a/linux-user/sparc/sockbits.h b/linux-user/sparc/sockbits.h
index d51ae5f84f..70bee083bb 100644
--- a/linux-user/sparc/sockbits.h
+++ b/linux-user/sparc/sockbits.h
@@ -67,38 +67,3 @@
 #define TARGET_SO_SECURITY_ENCRYPTION_TRANSPORT  0x5002
 #define TARGET_SO_SECURITY_ENCRYPTION_NETWORK    0x5004
 
-/** sock_type - Socket types
- *
- * Please notice that for binary compat reasons SPARC has to
- * override the enum sock_type in include/linux/net.h, so
- * we define ARCH_HAS_SOCKET_TYPES here.
- *
- * @SOCK_STREAM - stream (connection) socket
- * @SOCK_DGRAM - datagram (conn.less) socket
- * @SOCK_RAW - raw socket
- * @SOCK_RDM - reliably-delivered message
- * @SOCK_SEQPACKET - sequential packet socket
- * @SOCK_DCCP - Datagram Congestion Control Protocol socket
- * @SOCK_PACKET - linux specific way of getting packets at the dev level.
- *                For writing rarp and other similar things on the user
- *                level.
- * @SOCK_CLOEXEC - sets the close-on-exec (FD_CLOEXEC) flag.
- * @SOCK_NONBLOCK - sets the O_NONBLOCK file status flag.
- */
-
-enum sock_type {
-    TARGET_SOCK_STREAM      = 1,
-    TARGET_SOCK_DGRAM       = 2,
-    TARGET_SOCK_RAW         = 3,
-    TARGET_SOCK_RDM         = 4,
-    TARGET_SOCK_SEQPACKET   = 5,
-    TARGET_SOCK_DCCP        = 6,
-    TARGET_SOCK_PACKET      = 10,
-    TARGET_SOCK_CLOEXEC     = 0x400000,
-    TARGET_SOCK_NONBLOCK    = 0x4000,
-};
-
-#define TARGET_SOCK_MAX (TARGET_SOCK_PACKET + 1)
-#define TARGET_SOCK_TYPE_MASK 0xf  /* Covers up to TARGET_SOCK_MAX - 1. */
-
-#define ARCH_HAS_SOCKET_TYPES 1
