diff -Nurd -x'*~' pkg-config-0.28.orig/pkg.c pkg-config-0.28/pkg.c --- pkg-config-0.28.orig/pkg.c 2013-01-22 08:11:59.000000000 -0500 +++ pkg-config-0.28/pkg.c 2014-06-23 04:22:57.000000000 -0400 @@ -159,16 +159,17 @@ #endif dir = opendir (dirname_copy); g_free (dirname_copy); + + scanned_dir_count += 1; + if (!dir) { - debug_spew ("Cannot open directory '%s' in package search path: %s\n", - dirname, g_strerror (errno)); + debug_spew ("Cannot open directory #%i '%s' in package search path: %s\n", + scanned_dir_count, dirname, g_strerror (errno)); return; } - debug_spew ("Scanning directory '%s'\n", dirname); - - scanned_dir_count += 1; + debug_spew ("Scanning directory #%i '%s'\n", scanned_dir_count, dirname); while ((dent = readdir (dir))) {