mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-07 13:00:17 +02:00
multithreadprocs: fixed copile darwin fpc 3.3.1
git-svn-id: trunk@62375 -
This commit is contained in:
parent
12e1db7dc3
commit
72211dbe07
@ -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)}
|
||||
|
Loading…
Reference in New Issue
Block a user