On Wed, Mar 6, 2019 at 2:32 AM Alexander Kapshuk <alexander.kapshuk@gmail.com> wrote:
---------- Forwarded message --------- From: Alexander Kapshuk <alexander.kapshuk@gmail.com> Date: Wed, Mar 6, 2019 at 9:30 AM Subject: Re: undefined reference to `ioctl_tty' To: <noloader@gmail.com> ...
$ cat test.c #include <stdio.h> #include <string.h> #include <errno.h> #include <termios.h> #include <fcntl.h> #include <sys/ioctl.h>
int main(int argc, char* argv[]) { if (ioctl_tty(1 /*STDOUT_FILENO*/, TIOCEXCL, NULL) == -1) { fprintf(stderr, "%s\n", strerror(errno)); return 1; } return 0; }
While the man page does refer to this function as ioctl_tty, the actual signature, as shown in the man page, is: int ioctl(int fd, int cmd, ...);
Not ioctl_tty.
Derp, thanks. Jeff