tags 538372 patch thanks On Sat, Jul 25, 2009 at 12:03:50PM +0200, Guido Trotter wrote: > In file included from /usr/include/linux/socket.h:23, > from /usr/include/linux/netlink.h:4, > from t.c:1: > /usr/include/linux/uio.h:37: error: expected '=', ',', ';', 'asm' or > '__attribute__' before 'iov_length' > /usr/include/linux/uio.h:47: error: expected declaration specifiers or > '...' before 'size_t' Patches attached: * Fix uio.h * Remove socket.h backward compatibility code. Bastian -- The heart is not a logical organ. -- Dr. Janet Wallace, "The Deadly Years", stardate 3479.4
diff --git a/include/linux/uio.h b/include/linux/uio.h index b7fe138..1ea53da 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h @@ -42,7 +42,7 @@ struct kvec { * segment lengths have been validated. Because the individual lengths can * overflow a size_t when added together. */ -static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs) +static inline __kernel_size_t iov_length(const struct iovec *iov, unsigned long nr_segs) { unsigned long seg; size_t ret = 0;
diff --git a/include/linux/socket.h b/include/linux/socket.h index 3b461df..3273a0c 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -16,7 +16,7 @@ struct __kernel_sockaddr_storage { /* _SS_MAXSIZE value minus size of ss_family */ } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ -#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) +#ifdef __KERNEL__ #include <asm/socket.h> /* arch-dependent defines */ #include <linux/sockios.h> /* the SIOCxxx I/O controls */ @@ -101,21 +101,6 @@ struct cmsghdr { ((char *)(cmsg) - (char *)(mhdr)->msg_control))) /* - * This mess will go away with glibc - */ - -#ifdef __KERNEL__ -#define __KINLINE static inline -#elif defined(__GNUC__) -#define __KINLINE static __inline__ -#elif defined(__cplusplus) -#define __KINLINE static inline -#else -#define __KINLINE static -#endif - - -/* * Get the next cmsg header * * PLEASE, do not touch this function. If you think, that it is @@ -128,7 +113,7 @@ struct cmsghdr { * ancillary object DATA. --ANK (980731) */ -__KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size, +static inline struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size, struct cmsghdr *__cmsg) { struct cmsghdr * __ptr; @@ -140,7 +125,7 @@ __KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size, return __ptr; } -__KINLINE struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg) +static inline struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg) { return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg); }
Attachment:
signature.asc
Description: Digital signature