Debugger: Use posix_openpt instead of older getpt. Issue #40157, patch by Alfred Glänzer.

This commit is contained in:
Juha 2023-03-11 10:05:59 +02:00
parent d097213d7e
commit 6355188e5b
2 changed files with 2 additions and 1 deletions

View File

@ -122,7 +122,7 @@ var
begin
Close;
FPTy := getpt;
FPTy := posix_openpt(O_RDWR + O_NOCTTY);
if FPTy < 0 then Error;
if (grantpt(FPTy) < 0) or (unlockpt(FPTy) < 0) then begin
Error;

View File

@ -69,6 +69,7 @@ function __read(Handle: cint; var Buffer; Count: size_t): ssize_t; cdecl;externa
function __write(Handle: cint; const Buffer; Count: size_t): ssize_t; cdecl;external clib name 'write';
function __close(Handle: cint): cint; cdecl;external clib name 'close';
function getpt:cint;cdecl;external clib name 'getpt';
function posix_openpt(oflag: cint):cint;cdecl;external clib name 'posix_openpt';
function grantpt(__fd:cint):cint;cdecl;external clib name 'grantpt';
function unlockpt(__fd:cint):cint;cdecl;external clib name 'unlockpt';
function ptsname_r(__fd:cint; __buf:Pchar; __buflen:size_t):cint;cdecl;external clib name 'ptsname_r';