tags 350884 fixed-upstream thanks > struct msgbuf is only defined in linux/msg.h if __USE_GNU is defined, > i.e. if the programmer has defined _GNU_SOURCE. But the manpage doesn't > document that. > > #define _GNU_SOURCE > > should be added before > > #include <sys/types.h> > #include <sys/ipc.h> > #include <sys/msg.h> > > int msgsnd(int msqid, struct msgbuf *msgp, size_t msgsz, int msgflg); > > ssize_t msgrcv(int msqid, struct msgbuf *msgp, size_t msgsz, long msg- > typ, int msgflg);
Salut Samuel, The real problem is that the protypes of msgsnd() and msgrcv() on this page are incorrect (out of date). The msgp argument should be typed as "void *", and the msgbuf structure should be more clearly marked to indicate that it is a just template for the kind of object that msgp might point to. I have made changes along these lines, as well as various other fixes, and these will appear in upstream man-pages 2.23. Thanks for your report. Cheers, Michael -- Michael Kerrisk maintainer of Linux man pages Sections 2, 3, 4, 5, and 7 Want to help with man page maintenance? Grab the latest tarball at ftp://ftp.win.tue.nl/pub/linux-local/manpages/, read the HOWTOHELP file and grep the source files for 'FIXME'. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

