diff --git a/Compat.c b/Compat.c index 4cf27399..43d02ec7 100644 --- a/Compat.c +++ b/Compat.c @@ -94,11 +94,11 @@ int Compat_openat(const char* dirpath, #endif /* !HAVE_OPENAT */ -int Compat_readlinkat(int dirfd, - const char* dirpath, - const char* pathname, - char* buf, - size_t bufsize) { +ssize_t Compat_readlinkat(int dirfd, + const char* dirpath, + const char* pathname, + char* buf, + size_t bufsize) { #ifdef HAVE_READLINKAT diff --git a/Compat.h b/Compat.h index fff437be..3b567736 100644 --- a/Compat.h +++ b/Compat.h @@ -50,10 +50,10 @@ int Compat_openat(openat_arg_t dirpath, const char* pathname, int flags); #endif /* HAVE_OPENAT */ -int Compat_readlinkat(int dirfd, - const char* dirpath, - const char* pathname, - char* buf, - size_t bufsize); +ssize_t Compat_readlinkat(int dirfd, + const char* dirpath, + const char* pathname, + char* buf, + size_t bufsize); #endif /* HEADER_Compat */ diff --git a/linux/Platform.c b/linux/Platform.c index 833044b1..dc917459 100644 --- a/linux/Platform.c +++ b/linux/Platform.c @@ -371,7 +371,7 @@ char* Platform_getInodeFilename(pid_t pid, ino_t inode) { struct stat sb; struct dirent *de; DIR *dirp; - size_t len; + ssize_t len; int fd; char path[PATH_MAX];