Laguna, if you replace the line with:
Result := semop(FSemaphoreSetID,@sembuf,1);
then it should compile. As the comment suggests, this is a second class solution. It would be interesting to see if it compiled under MAC OS if you add a
{$DEFINE HAS_SEMTIMEDOP}
It won't. That call is linux specific. In my 2.4.4 it is therefore flagged with "platform" for that reason.
The call to "semtimedop" is a GNU extension
It is Linux functionality btw, not GNU functionality.
Sometimes that means though that it will be added by other platforms in the future. It seems that Linux has a tendency to add calls when the standards are not finalized, and most other targets only add them when the standard is finalized.
If you plan to support FreebSD or Mac OS X, make sure you use the types for handles from the relevant FPC units as much as possible. Otherwise you'll get into trouble on 64-bit versions of these systems, since many handletypes are "pointer" on BSD derivates that are "int" on Linux.