Commit b81a3e2c authored by Simon McVittie's avatar Simon McVittie

capture-libs: Don't assume needed[i].name is a basename

We can set needed[0] to the absolute path to a loadable module, and
in fact we will need to do that when collecting the dependencies
of a Mesa DRI driver.
Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
parent f1bfe93c
......@@ -242,13 +242,16 @@ capture_one( const char *soname, capture_flags flags,
{
_capsule_autofree char *target = NULL;
struct stat statbuf;
const char *its_basename;
if( !provider.needed[i].name )
{
continue;
}
if( fstatat( dest_fd, provider.needed[i].name, &statbuf,
its_basename = my_basename( provider.needed[i].name );
if( fstatat( dest_fd, its_basename, &statbuf,
AT_SYMLINK_NOFOLLOW ) == 0 )
{
/* We already created a symlink for this library. No further
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment