GDB's libiberty.h has a prototype of the basename() function it which
does not match the one that is part of POSIX, declared in libgen.h. This
is normally never visible, as GDB never includes libgen.h. On FreeBSD,
it unfortunately is, as our locally added copy of kgdb includes both.
Fix up libiberty.h to just include libgen.h. I'm currently discussing
with upstream how a clean fix should be done, but I guess that
requires more refactoring to the existing code. We'd better not bother
importing that and stick to this compact workaround.
I'll also ask the port maintainers to look at this change.