If a library is found in the hints file, but the library doesn't exist,

ignore the hint.

This is a straightforward fix, and it should go into 2.2 after a burn-in
period of a few days.

Noticed by:	bde
This commit is contained in:
jdp 1997-01-14 17:53:55 +00:00
parent 911d47a567
commit dcd41564c5
2 changed files with 8 additions and 0 deletions

View File

@ -1711,6 +1711,10 @@ findhint(name, major, minorp)
*/
if (strcmp(name, hstrtab + bp->hi_namex) == 0 &&
bp->hi_major == major) {
struct stat s;
if (stat(hstrtab + bp->hi_pathx, &s) == -1)
return NULL; /* Doesn't actually exist */
*minorp = bp->hi_ndewey >= 2 ? bp->hi_minor : -1;
return strdup(hstrtab + bp->hi_pathx);
}

View File

@ -1711,6 +1711,10 @@ findhint(name, major, minorp)
*/
if (strcmp(name, hstrtab + bp->hi_namex) == 0 &&
bp->hi_major == major) {
struct stat s;
if (stat(hstrtab + bp->hi_pathx, &s) == -1)
return NULL; /* Doesn't actually exist */
*minorp = bp->hi_ndewey >= 2 ? bp->hi_minor : -1;
return strdup(hstrtab + bp->hi_pathx);
}