This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Likely incorrect patch: remove the faulty basename() prototype from libiberty
- From: DJ Delorie <dj at redhat dot com>
- To: Ed Schouten <ed at nuxi dot nl>
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 29 May 2016 12:32:15 -0400
- Subject: Re: Likely incorrect patch: remove the faulty basename() prototype from libiberty
- Authentication-results: sourceware.org; auth=none
Ed Schouten <ed@nuxi.nl> writes:
> For now I'm solving this by simply patching up libiberty to pull in
> the declaration from libgen.h. This seems to make everything build
> again.
Unless you check *every* one of those operating systems, and put in a
configure test for libgen and test for it, this patch is wrong.
Most likely, you're not calling configure right, else it would have seen
the right prototype and skipped this part of the header. Or libiberty's
configure and tests need to check for libgen.h as well as the other
headers it's checking for.
Either way, you can't blindly depend on a header being present and
useful. "Seems to" is insufficient evidence that a patch is correct.