diff --git a/components/debuggerintf/dbgintfpseudoterminal.pas b/components/debuggerintf/dbgintfpseudoterminal.pas index d5a0605663..e118cae805 100644 --- a/components/debuggerintf/dbgintfpseudoterminal.pas +++ b/components/debuggerintf/dbgintfpseudoterminal.pas @@ -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; diff --git a/components/debuggerintf/ideminilibc.pas b/components/debuggerintf/ideminilibc.pas index a1cdb8e741..feb285f3c0 100644 --- a/components/debuggerintf/ideminilibc.pas +++ b/components/debuggerintf/ideminilibc.pas @@ -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';