Prevent warning in libc_noux

__INT_MAX__ equals 2147483647 which are roughly 68 years.
This commit is contained in:
Christian Helmuth 2015-07-03 14:12:15 +02:00
parent 0cd93c64aa
commit b1dd5fdf1d

View File

@ -689,7 +689,7 @@ extern "C" int nanosleep(const struct timespec *timeout,
extern "C" unsigned int sleep(unsigned int seconds)
{
struct timespec dummy = { seconds, 0 };
struct timespec dummy = { Genode::min<int>(seconds, __INT_MAX__), 0 };
/*
* Always return 0 because our nanosleep() cannot not be interrupted.