warning: no previous prototype for `cmsg_nxthdr' in 2.1.13

Linux Kernel (kernel@in-tech.in-tech.com)
Sun, 1 Dec 1996 01:37:00 -0500 (EST)


When compiling some of my code, I get the following error:

In file included from /usr/include/sys/socket.h:5,
from /usr/include/netinet/in.h:23,
from /usr/include/rpc/rpc.h:45,
from rpcutil_xdr.c:1:
/usr/include/linux/socket.h:69: warning: no previous prototype for `cmsg_nxthdr'

I got around it using this patch:
*** /usr/src/linux-2.1.13/include/linux/socket.h Sat Nov 30
12:28:20 1996
--- /usr/src/linux-2.1.13/include/linux/socket.h.~1~ Sat Nov 30
12:27:31 1996
***************
*** 60,67 ****
#define CMSG_DATA(cmsg) cmsg->cmsg_data
#define CMSG_NXTHDR(mhdr, cmsg) cmsg_nxthdr(mhdr, cmsg)
#define CMSG_FIRST(mhdr) ((struct cmsghdr *) (mhdr)->msg_control)
- extern __inline__ struct cmsghdr * cmsg_nxthdr(struct msghdr *mhdr,
- struct cmsghdr *cmsg);

extern __inline__ struct cmsghdr * cmsg_nxthdr(struct msghdr *mhdr,
struct cmsghdr *cmsg)
--- 60,65 ----

Roel Lascano
rlascano@in-tech.com