On Mon, Jun 11, 2018 at 05:05:02PM +0200, Pau wrote:
> Hello:
> 
> I am trying to compile a very old piece of software, supermongo, on -current.
> 
> The first complain I get from gmake is that
> 
> get1char.c:26:14: fatal error: 'sgtty.h' file not found
> #    include <sgtty.h>
>              ^~~~~~~~~
> 1 error generated.
> *** Error 1 in devices (Makefile:5 'get1char.o')
> 
> 
> My first guess is that it's been removed from current because it was a
> very old thing and maybe with security holes. What would be a
> workaround? I guess that quite a few codes still need that?
> 

Wow. It has been removed but you can see it in an old, I mean very
old, man page http://man.openbsd.org/OpenBSD-2.2/stty.3

---snip---
     These interfaces are obsoleted by ioctl(2).  They are available from the
     compatibility library, libcompat.

     The stty() function sets the state of the terminal associated with fd.
     The gtty() function retrieves the state of the terminal associated with
     fd. To set the state of a terminal the call must have write permission.

     The stty() call is actually `ioctl(fd, TIOCSETP, buf)', while the gtty()
     call is `ioctl(fd, TIOCGETP, buf)'. See ioctl(2) and tty(4) for an expla-
     nation.
---snap---

Reyk

Reply via email to