* stdlib/canonicalize.c: Do not include <sys/stat.h>; no longer needed.
(__realpath): Use __readlink instead of __lxstat64 to determine
whether RPATH is a symbolic link. This avoids an unnecessary
__lxstat64 when RPATH is a symbolic link and replaces __lxstat64
with __readlink when RPATH is not a symbolic link. It also avoids
an unnecessary failure if __lxstat64 would fail with errno ==
EOVERFLOW due to timestamp or other integer overflow. Remove
unnecessary S_ISDIR check, as the next time through the loop will
fail with errno == ENOTDIR as appropriate.
stdlib/canonicalize.c | 28 +++++++++++-----------------
1 file changed, 11 insertions(+), 17 deletions(-)