Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fixes #382. Allow multi-part version numbers for shlibs. Technically this is *wrong*. The ABI version should be a simple integer or not present at all. However cluelessness abounds and eg. the mail/elm+ME port gets it wrong.
Matthew Seaman committed 13 years ago
commit 5a652cd46028fd2a00a846038b63dda9215a54eb
parent 8c0e9b1
1 file changed +4 -3
modified libpkg/elfhints.c
@@ -223,13 +223,14 @@ scan_dirs_for_shlibs(struct shlib_list *shlib_list, int numdirs,
			    strncmp(dp->d_name, "lib", 3) != 0)
				continue;
			vers = dp->d_name + len;
-
			while (vers > dp->d_name && isdigit(*(vers-1)))
+
			while (vers > dp->d_name &&
+
			       (isdigit(*(vers-1)) || *(vers-1) == '.'))
				vers--;
			if (vers == dp->d_name + len) {
				if (strncmp(vers - 3, ".so", 3) != 0)
					continue;
-
			} else if (vers < dp->d_name + 4 ||
-
			    strncmp(vers - 4, ".so.", 4) != 0)
+
			} else if (vers < dp->d_name + 3 ||
+
			    strncmp(vers - 3, ".so.", 4) != 0)
				continue;

			/* We have a valid shared library name. */