diff --git a/components/multithreadprocs/mtpcpu.pas b/components/multithreadprocs/mtpcpu.pas index 79cf6562ea..3337b859e2 100644 --- a/components/multithreadprocs/mtpcpu.pas +++ b/components/multithreadprocs/mtpcpu.pas @@ -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)}