1
0
mirror of https://github.com/UzixLS/picocom.git synced 2025-07-19 07:21:18 +03:00

Replaced ETIME with ETIMEDOUT

ETIME may not be defined on all systems
This commit is contained in:
Nick Patavalis
2018-02-27 20:16:19 +02:00
parent faed52cd2e
commit df9b2e3a62

View File

@ -1124,7 +1124,7 @@ msec2tv (struct timeval *tv, long ms)
until the timeout expires. Returns a positive on success, zero if
read(2) returned zero, and a negative on any other error
(incl. timeoute expiration). On timeout expiration, errno is set to
ETIME.*/
ETIMEDOUT.*/
static int
tn2217_wait_cond(struct term_s *t, int (*cond)(struct term_s *t), int tmo_msec)
{
@ -1153,7 +1153,7 @@ tn2217_wait_cond(struct term_s *t, int (*cond)(struct term_s *t), int tmo_msec)
if ( timercmp(&now, &tmo_abs, <) ) {
timersub(&tmo_abs, &now, &tmo_tv);
} else {
errno = ETIME;
errno = ETIMEDOUT;
return -1;
}
}