diff --git a/lib/fs/readlink/readlinknul.c b/lib/fs/readlink/readlinknul.c index 4baea0d01..b0fc2a786 100644 --- a/lib/fs/readlink/readlinknul.c +++ b/lib/fs/readlink/readlinknul.c @@ -7,7 +7,8 @@ #include "fs/readlink/readlinknul.h" #include +#include -extern inline int readlinknul(const char *restrict link, char *restrict buf, +extern inline ssize_t readlinknul(const char *restrict link, char *restrict buf, size_t size); diff --git a/lib/fs/readlink/readlinknul.h b/lib/fs/readlink/readlinknul.h index b063a508b..606c2e112 100644 --- a/lib/fs/readlink/readlinknul.h +++ b/lib/fs/readlink/readlinknul.h @@ -22,12 +22,12 @@ ATTR_STRING(1) -inline int readlinknul(const char *restrict link, char *restrict buf, +inline ssize_t readlinknul(const char *restrict link, char *restrict buf, size_t size); // Similar to readlink(2), but terminate the string. -inline int +inline ssize_t readlinknul(const char *restrict link, char *restrict buf, size_t size) { size_t ulen;