fixincludes: don't abort() on access failure [PR103306]
authorXi Ruoyao <xry111@mengyan1223.wang>
Thu, 18 Nov 2021 10:46:12 +0000 (18:46 +0800)
committerXi Ruoyao <xry111@mengyan1223.wang>
Tue, 23 Nov 2021 19:18:38 +0000 (03:18 +0800)
commit3363022ed810a2797c47867890547c8f73163257
tree966dffcf67066d7d2e3c6d37253c17ab34327dcf
parentd6024c85a1ce568f874afa1d9431c43eccba2f59
fixincludes: don't abort() on access failure [PR103306]

Some distro may ship dangling symlinks in include directories, triggers
the access failure.  Skip it and continue to next header instead of
being to panic.

Restore to old behavior before r12-5234 but without resurrecting the
problematic getcwd() call, by using the environment variable "INPUT"
exported by fixinc.sh.

Tested on x86_64-linux-gnu, with a dangling symlink intentionally
injected into /usr/include.

fixincludes/

PR bootstrap/103306
* fixincl.c (process): Don't call abort().
fixincludes/fixincl.c