multithreadprocs: fixed copile darwin fpc 3.3.1

git-svn-id: trunk@62375 -
This commit is contained in:
mattias 2019-12-11 10:31:51 +00:00
parent 12e1db7dc3
commit 72211dbe07

View File

@ -68,6 +68,8 @@ end;
t = sysconf(_SC_NPROC_ONLN);
end;
{$ELSEIF defined(freebsd) or defined(darwin)}
type
PSysCtl = {$IF FPC_FULLVERSION>30300}pcint{$ELSE}pchar{$ENDIF};
var
mib: array[0..1] of cint;
len: csize_t;
@ -76,7 +78,7 @@ begin
mib[0] := CTL_HW;
mib[1] := HW_NCPU;
len := sizeof(t);
fpsysctl(pchar(@mib), 2, @t, @len, Nil, 0);
fpsysctl(PSysCtl(@mib), 2, @t, @len, Nil, 0);
Result:=t;
end;
{$ELSEIF defined(linux)}