mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
mach: Make clock_nanosleep also check tv_sec
This commit is contained in:
parent
7bc54f0965
commit
fb1059d42a
1 changed files with 1 additions and 0 deletions
|
@ -68,6 +68,7 @@ __clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
|
||||||
struct timespec *rem)
|
struct timespec *rem)
|
||||||
{
|
{
|
||||||
if (clock_id != CLOCK_REALTIME
|
if (clock_id != CLOCK_REALTIME
|
||||||
|
|| req->tv_sec < 0
|
||||||
|| !valid_nanoseconds (req->tv_nsec)
|
|| !valid_nanoseconds (req->tv_nsec)
|
||||||
|| (flags != 0 && flags != TIMER_ABSTIME))
|
|| (flags != 0 && flags != TIMER_ABSTIME))
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue