#1 2017-03-20 17:35:22

vonH
Member
Registered: 2015-03-06
Posts: 17

Compling TestSQL3.dpr results in variable RLIMIT not found error?

When I try to compile TestSQL3.dpr on Linux the following error comes up in SynCrtSock line 3033. The code is from the github version of March 17 2017.

Compile Project, Target: fpc/bin/i386-linux/TestSQL3: Exit code 256, Errors: 10, Warnings: 24
SynCrtSock.pas(3303,12) Error: Identifier not found "RLIMIT"
SynCrtSock.pas(3303,18) Error: Error in type definition
SynCrtSock.pas(3311,23) Error: Illegal qualifier
SynCrtSock.pas(3312,23) Error: Illegal qualifier
SynCrtSock.pas(3317,12) Error: Identifier not found "RLIMIT"

function GetFileOpenLimit(hard: boolean=false): integer;
var limit: RLIMIT;
begin
  {$ifdef FPC}
  if fpgetrlimit(RLIMIT_NOFILE,@limit)=0 then
  {$else}
  if getrlimit(RLIMIT_NOFILE,limit)=0 then
  {$endif}
    if hard then
      result := limit.rlim_max else
      result := limit.rlim_cur else
    result := -1;
end;

The code is in an ifdef which does not apply to Windows.

PS. Is there any kind of package, ie a Lazarus lpk that can be added to a mORMot based program to ensure all the mORMot dependencies and path are available to the project?

Offline

#2 2017-03-22 06:59:55

cybexr
Member
Registered: 2016-09-14
Posts: 78

Re: Compling TestSQL3.dpr results in variable RLIMIT not found error?

it's a mis-writing, RLIMIT  should be  PRLIMIT ,  I've create a pull-request on github.

Offline

#3 2017-03-22 14:11:37

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,204
Website

Re: Compling TestSQL3.dpr results in variable RLIMIT not found error?

Offline

#4 2017-03-23 01:59:06

cybexr
Member
Registered: 2016-09-14
Posts: 78

Re: Compling TestSQL3.dpr results in variable RLIMIT not found error?

yeah , ab you you're right, thank you for replying

Offline

Board footer

Powered by FluxBB