Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Hongjiu Zhang authored and Mike Frysinger committed Mar 7, 2016
1 parent abc40bb commit f5e753c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
2016-03-07 Hongjiu Zhang <noctuorare@gmail.com>

* elf/sln.c (makesymlink): Change struct stat to stat64, and lstat
to lstat64.

2016-03-07 Florian Weimer <fweimer@redhat.com>

* libio/filedoalloc.c (isatty): Remove.
Expand Down
4 changes: 2 additions & 2 deletions elf/sln.c
Expand Up @@ -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))
{
Expand Down

0 comments on commit f5e753c

Please sign in to comment.