summaryrefslogtreecommitdiff
path: root/include/linux/socket.h
diff options
context:
space:
mode:
authorHideaki Yoshifuji <yoshfuji@linux-ipv6.org>2003-10-23 14:36:03 -0700
committerHideaki Yoshifuji <yoshfuji@linux-ipv6.org>2003-10-23 14:36:03 -0700
commitf3979b0fd567381637143d3ad2083b9d63a77939 (patch)
tree1af7dcfc40dff87c8e856899ff28eb2c1ef5ca8b /include/linux/socket.h
parenta0285d9ec3ecc871597cddeec47c0898d6afef6a (diff)
[NET]: Forward port iproute2 build fix from 2.4.23-preX
Diffstat (limited to 'include/linux/socket.h')
-rw-r--r--include/linux/socket.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 72b8b6fa3d96..0010dee5f9a2 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -1,6 +1,21 @@
#ifndef _LINUX_SOCKET_H
#define _LINUX_SOCKET_H
+/*
+ * Desired design of maximum size and alignment (see RFC2553)
+ */
+#define _K_SS_MAXSIZE 128 /* Implementation specific max size */
+#define _K_SS_ALIGNSIZE (__alignof__ (struct sockaddr *))
+ /* Implementation specific desired alignment */
+
+struct __kernel_sockaddr_storage {
+ unsigned short ss_family; /* address family */
+ /* Following field(s) are implementation specific */
+ char __data[_K_SS_MAXSIZE - sizeof(unsigned short)];
+ /* space to achieve desired size, */
+ /* _SS_MAXSIZE value minus size of ss_family */
+} __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */
+
#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
#include <linux/config.h> /* for CONFIG_COMPAT */
@@ -27,20 +42,7 @@ struct linger {
int l_linger; /* How long to linger for */
};
-/*
- * Desired design of maximum size and alignment (see RFC2553)
- */
-#define _SS_MAXSIZE 128 /* Implementation specific max size */
-#define _SS_ALIGNSIZE (__alignof__ (struct sockaddr *))
- /* Implementation specific desired alignment */
-
-struct sockaddr_storage {
- sa_family_t ss_family; /* address family */
- /* Following field(s) are implementation specific */
- char __data[_SS_MAXSIZE - sizeof(sa_family_t)];
- /* space to achieve desired size, */
- /* _SS_MAXSIZE value minus size of ss_family */
-} __attribute__ ((aligned(_SS_ALIGNSIZE))); /* force desired alignment */
+#define sockaddr_storage __kernel_sockaddr_storage
/*
* As we do 4.4BSD message passing we use a 4.4BSD message passing