diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-02-25 13:02:37 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-02-25 13:02:37 -0500 |
commit | 02793ccec496e9ca1ea5e3474b70b39dfea388a9 (patch) | |
tree | bd49e7a543e373f293cbbe730c8ddc74c5219097 /src/rpath.c | |
parent | bc30328962bb48c932239dc6e3e59c4f299c5d65 (diff) | |
download | spmc-02793ccec496e9ca1ea5e3474b70b39dfea388a9.tar.gz |
Break out of scanning loop when a match is discovered
Diffstat (limited to 'src/rpath.c')
-rw-r--r-- | src/rpath.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpath.c b/src/rpath.c index 2976ed8..42a4c07 100644 --- a/src/rpath.c +++ b/src/rpath.c @@ -121,7 +121,7 @@ char *rpath_get(const char *_filename) { * @return */ char *rpath_generate(const char *_filename) { - char *origin = "$ORIGIN/"; + char *origin = "$ORIGIN/../lib:$ORIGIN/"; char *filename = realpath(_filename, NULL); if (!filename) { @@ -239,6 +239,7 @@ char *rpath_autodetect(const char *filename) { if (exists(check_path) == 0) { // The library exists so mark it for processing has_real_libdir = 1; // gate for memory allocation below + break; } free(check_path); } |