msgget and IPC problem


I am a student and I am required to write a small application in C for UNIX. Having a G4, I am doing it with OSX. The application has to do IPC via message queues (it is required), so the code contains the function msgget, which appears in the Darwin man pages and in all the books.

The trouble is that the shell (Terminal) says to me that the header file sys/msg.h can't be found; strangely it compiles correctly without including it, but then at runtime there is an error saying that msgget is a non supported operation.

What's wrong, and how can I fix it? Thanks very much for replying.

edoardo tealdi