diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/socket.h | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/include/linux/socket.h b/include/linux/socket.h index 3b461dffe244..3273a0c5043b 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
| @@ -16,7 +16,7 @@ struct __kernel_sockaddr_storage { | |||
| 16 | /* _SS_MAXSIZE value minus size of ss_family */ | 16 | /* _SS_MAXSIZE value minus size of ss_family */ |
| 17 | } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ | 17 | } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ |
| 18 | 18 | ||
| 19 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | 19 | #ifdef __KERNEL__ |
| 20 | 20 | ||
| 21 | #include <asm/socket.h> /* arch-dependent defines */ | 21 | #include <asm/socket.h> /* arch-dependent defines */ |
| 22 | #include <linux/sockios.h> /* the SIOCxxx I/O controls */ | 22 | #include <linux/sockios.h> /* the SIOCxxx I/O controls */ |
| @@ -101,21 +101,6 @@ struct cmsghdr { | |||
| 101 | ((char *)(cmsg) - (char *)(mhdr)->msg_control))) | 101 | ((char *)(cmsg) - (char *)(mhdr)->msg_control))) |
| 102 | 102 | ||
| 103 | /* | 103 | /* |
| 104 | * This mess will go away with glibc | ||
| 105 | */ | ||
| 106 | |||
| 107 | #ifdef __KERNEL__ | ||
| 108 | #define __KINLINE static inline | ||
| 109 | #elif defined(__GNUC__) | ||
| 110 | #define __KINLINE static __inline__ | ||
| 111 | #elif defined(__cplusplus) | ||
| 112 | #define __KINLINE static inline | ||
| 113 | #else | ||
| 114 | #define __KINLINE static | ||
| 115 | #endif | ||
| 116 | |||
| 117 | |||
| 118 | /* | ||
| 119 | * Get the next cmsg header | 104 | * Get the next cmsg header |
| 120 | * | 105 | * |
| 121 | * PLEASE, do not touch this function. If you think, that it is | 106 | * PLEASE, do not touch this function. If you think, that it is |
| @@ -128,7 +113,7 @@ struct cmsghdr { | |||
| 128 | * ancillary object DATA. --ANK (980731) | 113 | * ancillary object DATA. --ANK (980731) |
| 129 | */ | 114 | */ |
| 130 | 115 | ||
| 131 | __KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size, | 116 | static inline struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size, |
| 132 | struct cmsghdr *__cmsg) | 117 | struct cmsghdr *__cmsg) |
| 133 | { | 118 | { |
| 134 | struct cmsghdr * __ptr; | 119 | struct cmsghdr * __ptr; |
| @@ -140,7 +125,7 @@ __KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size, | |||
| 140 | return __ptr; | 125 | return __ptr; |
| 141 | } | 126 | } |
| 142 | 127 | ||
| 143 | __KINLINE struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg) | 128 | static inline struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg) |
| 144 | { | 129 | { |
| 145 | return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg); | 130 | return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg); |
| 146 | } | 131 | } |
