On Linux glu.pas works good as it is, at least for me, so I think that problem is not in SDL gl headers but with FPC.

To make things more interesting I found another working version of gluUnProject (WIN32)

[pascal]
gluUnProject: function(winx, winy, winz: GLdouble; const modelMatrix, projMatrix: T16dArray; const viewport: TViewPortArray; objx, objy, objz: PGLdouble): Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF}
[/pascal]
All three arrays are passed as consts.

And I suppose if the declaration of gluUnproject should be changed, so should gluProject.