Changing the type of mtype from longword to int64 did the trick, thank you very much!
You are right about the missing & character too, but that was only a mistake in the example code i provided here; in the actual code, the & was there to sign the octal representation: the erroneous type caused the problem.
I don't get this though. These functions are calling the libc functions, aren't they? (At least according to packages/rtl-extra/src/unix/ipc.pp:656, or FPC_USE_LIBC is not set?) The needed structure should be identical and the C versions use 32-bit for that field everywhere...