You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've had a few errors while compiling on Ubuntu. 18.04 (which has glibc 1.27).
First, I had to apply the patch defined in #2 to compile at all. Without both the -02 and SVR4 flags present, compilation failed.
With that patch applied, I then saw warnings similar to the following during compilation:
ttyrec.c: In function 'getslave':
ttyrec.c:447:2: warning: implicit declaration of function 'grantpt' [-Wimplicit-function-declaration]
grantpt( master);
^~~~~~~
I would receive the same warnings for usager of each of unlockpt and ptsname. Compilation would finish, but any attempt to run ttyrec would result in the following error message:
open(fd, ORDWR): Bad address
I did some sleuthing, and it appears that the grantpt et al prototypes require additional macro definitions. What I found worked was the following:
(Those lines MUST occur before #include <stdlib.h>.)
Once those lines were in place, along with the patch from #2, compilation worked.
(I received a few additional warnings, primarily around missing sentinels in execl calls and ignoring the return value of write, but these did not adversely affect the final binary produced.)
The text was updated successfully, but these errors were encountered:
I've had a few errors while compiling on Ubuntu. 18.04 (which has glibc 1.27).
First, I had to apply the patch defined in #2 to compile at all. Without both the
-02
andSVR4
flags present, compilation failed.With that patch applied, I then saw warnings similar to the following during compilation:
I would receive the same warnings for usager of each of
unlockpt
andptsname
. Compilation would finish, but any attempt to runttyrec
would result in the following error message:I did some sleuthing, and it appears that the
grantpt
et al prototypes require additional macro definitions. What I found worked was the following:(Those lines MUST occur before
#include <stdlib.h>
.)Once those lines were in place, along with the patch from #2, compilation worked.
(I received a few additional warnings, primarily around missing sentinels in
execl
calls and ignoring the return value ofwrite
, but these did not adversely affect the final binary produced.)The text was updated successfully, but these errors were encountered: