Skip to content

Commit df34e2a

Browse files
Leontbingos
authored andcommitted
Only include existent directories in libpath
Otherwise, one can try to open non-existent directories, leading to warnings about invalid dirhandles.
1 parent 752c743 commit df34e2a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/ExtUtils/Liblist/Kid.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ sub _unix_os2_ext {
6262
chomp(my @incpath = grep s/^ //, grep { /^#include </ .. /^End of search / } `$Config{cc} -E -v - </dev/null 2>&1 >/dev/null`);
6363
unshift @libpath, map { s{/include[^/]*}{/lib}; $_ } @incpath
6464
}
65+
@libpath = grep -d, @libpath;
6566

6667
if ( $^O eq 'darwin' or $^O eq 'next' ) {
6768
# 'escape' Mach-O ld -framework and -F flags, so they aren't dropped later on

0 commit comments

Comments
 (0)