bug with older glibc: "brctl show" shows nothing

Older glibc has a bug in scandir() where if the last call to filter
is a failure and filter sets errno, scandir() will fail and return that
errno to the caller.

If running "brctl show" on a system where the last (sorted) directory
in /sys/class/net is not a bridge, isbridge() will leave errno set to
ENOENT and trigger this bug in glibc.

Attached patch against bridge-utils v1.5 saves/restores errno in
isbridge() to workaround this bug in older glibc.
1 file changed