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:
4
tn2217.c
4
tn2217.c
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user