summary refs log tree commit diff
path: root/elf/sln.c
diff options
context:
space:
mode:
authorHongjiu Zhang <noctuorare@gmail.com>2016-03-06 20:18:21 -0500
committerMike Frysinger <vapier@gentoo.org>2016-03-07 11:37:12 -0500
commitf5e753c8c3a18a1e3c715dd11bf4dc341b5c481f (patch)
tree8faf6316da4374ed7e3228845a86a1a298096c58 /elf/sln.c
parentabc40bb2a78b358935a604451b7e7eb83d8d77c4 (diff)
downloadglibc-f5e753c8c3a18a1e3c715dd11bf4dc341b5c481f.tar.gz
glibc-f5e753c8c3a18a1e3c715dd11bf4dc341b5c481f.tar.xz
glibc-f5e753c8c3a18a1e3c715dd11bf4dc341b5c481f.zip
sln: use stat64
When using sln on some filesystems which return 64-bit inodes,
the stat call might fail during install like so:
	.../elf/sln .../elf/symlink.list
	/lib32/libc.so.6: invalid destination: Value too large for defined data type
	/lib32/ld-linux.so.2: invalid destination: Value too large for defined data type
	Makefile:104: recipe for target 'install-symbolic-link' failed

Switch to using stat64 all the time to avoid this.

URL: https://bugs.gentoo.org/576396
Diffstat (limited to 'elf/sln.c')
-rw-r--r--elf/sln.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/elf/sln.c b/elf/sln.c
index 9d57be2df5..f52cb9f44a 100644
--- a/elf/sln.c
+++ b/elf/sln.c
@@ -164,11 +164,11 @@ makesymlinks (const char *file)
 static int
 makesymlink (const char *src, const char *dest)
 {
-  struct stat stats;
+  struct stat64 stats;
   const char *error;
 
   /* Destination must not be a directory. */
-  if (lstat (dest, &stats) == 0)
+  if (lstat64 (dest, &stats) == 0)
     {
       if (S_ISDIR (stats.st_mode))
 	{