mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 17:49:10 -04:00
Merge branch 'contrib/github_pr_10334_v5.0' into 'release/v5.0'
Set errno in adjtime (GitHub PR) (v5.0) See merge request espressif/esp-idf!22598
This commit is contained in:
commit
2aed3d6056
@ -123,6 +123,7 @@ int adjtime(const struct timeval *delta, struct timeval *outdelta)
|
||||
int64_t sec = delta->tv_sec;
|
||||
int64_t usec = delta->tv_usec;
|
||||
if(llabs(sec) > ((INT_MAX / 1000000L) - 1L)) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
/*
|
||||
@ -139,6 +140,7 @@ int adjtime(const struct timeval *delta, struct timeval *outdelta)
|
||||
}
|
||||
return 0;
|
||||
#else
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user