You should #include <time.h> for the nanosleep prototype.
Otherwise OK.
- todd
On Thu, 09 Oct 2014 15:22:29 +1000, David Gwynne wrote:
> deraadt points out i suck at grep.
>
> ok?
>
> Index: termios/tcsendbreak.c
> ===================================================================
> RCS file: /cvs/src/lib/libc/termios/tcsendbreak.c,v
> retrieving revision 1.6
> diff -u -p -r1.6 tcsendbreak.c
> --- termios/tcsendbreak.c 5 Aug 2005 13:03:00 -0000 1.6
> +++ termios/tcsendbreak.c 9 Oct 2014 05:21:30 -0000
> @@ -43,13 +43,14 @@
> int
> tcsendbreak(int fd, int len)
> {
> - struct timeval sleepytime;
> + struct timespec sleepytime;
>
> sleepytime.tv_sec = 0;
> - sleepytime.tv_usec = 400000;
> + sleepytime.tv_nsec = 400000000;
> +
> if (ioctl(fd, TIOCSBRK, 0) == -1)
> return (-1);
> - (void)select(0, 0, 0, 0, &sleepytime);
> + (void)nanosleep(&sleepytime, NULL);
> if (ioctl(fd, TIOCCBRK, 0) == -1)
> return (-1);
> return (0);
>