1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:17:44 +00:00

LibC: Change return type for sleep() to unsigned int

According to POSIX.1-2001 the return type should be unsigned int.
This commit is contained in:
Gunnar Beutner 2021-04-11 19:00:36 +02:00 committed by Andreas Kling
parent 6a808d96b5
commit 546fa8cfb5
2 changed files with 2 additions and 2 deletions

View file

@ -409,7 +409,7 @@ char* getwd(char* buf)
return p; return p;
} }
int sleep(unsigned seconds) unsigned int sleep(unsigned int seconds)
{ {
struct timespec ts = { seconds, 0 }; struct timespec ts = { seconds, 0 };
if (clock_nanosleep(CLOCK_MONOTONIC_COARSE, 0, &ts, nullptr) < 0) if (clock_nanosleep(CLOCK_MONOTONIC_COARSE, 0, &ts, nullptr) < 0)

View file

@ -106,7 +106,7 @@ int chdir(const char* path);
int fchdir(int fd); int fchdir(int fd);
char* getcwd(char* buffer, size_t size); char* getcwd(char* buffer, size_t size);
char* getwd(char* buffer); char* getwd(char* buffer);
int sleep(unsigned seconds); unsigned int sleep(unsigned int seconds);
int usleep(useconds_t); int usleep(useconds_t);
int gethostname(char*, size_t); int gethostname(char*, size_t);
int sethostname(const char*, ssize_t); int sethostname(const char*, ssize_t);