I never had problems using Rudy's code in FPC using my own translation for this particular code and have been using it intensively. As long as the declarations are correct - and they are for Delphi style. Maybe constref?
Note that there is also a rect function, not structure, and as far I can recall that causes problems depending on unit order. We can't asked him, because he passed away a couple of years ago, way to young. Good programming friend. We used to work on C++ interop.
I will look up what I did shortly after the date he published it.
There also exist at least two versions of it: one without dotted notation (older) and the onne with the dotted notation. I have both.