readlink returns ssize_t, not int, post glibc-2.4
Status: Beta
Brought to you by:
pmiller
g++ -g -O2 -Wall -Ilib -c lib/readlink.cc -fPIC -DPIC -o lib/.libs/readlink.o
lib/readlink.cc: In function `int readlink(const char*, char*, size_t)':
lib/readlink.cc:32: error: declaration of C function `int readlink(const char*, char*, size_t)' conflicts with
/usr/include/gentoo-multilib/amd64/unistd.h:775: error: previous declaration `ssize_t readlink(const char*, char*, size_t)' here
From the readlink(2) man page:
HISTORY
In versions of glibc up to and including glibc 2.4, the return type of readlink() was declared as int. Nowadays, the return type is declared as ssize_t, as (newly) required in POSIX.1-2001.
Logged In: YES
user_id=44367
Originator: YES
It's trivial -- but hey, I've got a patch, might as well attach it.
File Added: plasticfs-readlink.patch
Logged In: YES
user_id=160
Originator: NO
Will be fixed in 1.10.
See http://aegis.sourceforge.net/cgi-bin/aegis.cgi?file@proj_menu+project@plasticfs.1.9 for patch