Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: conflicting elf definitions in system headers
On Mon, Feb 10, 2025 at 11:38:47AM +0000, Joseph Koshy wrote:
> wiz> Are these headers expected to conflict, and the bug is in the program
> wiz> including both? In this case, which header should it include?
>
> The <gelf.h> and <libelf.h> headers should suffice in themselves - they don't
> need OS-specific #includes.
>
> Perhaps the sense of the check needs to be reversed?
>
> --- pkg_elf.c-- 2025-02-10 11:20:10.073896326 +0000
> +++ pkg_elf.c 2025-02-10 11:20:04.688882272 +0000
> @@ -48,7 +48,7 @@
> #include <fcntl.h>
> #include <gelf.h>
> #include <libgen.h>
> -#if defined(HAVE_LINK_H) && !defined(__DragonFly__) && defined(HAVE_LIBELF_H)
> +#if defined(HAVE_LINK_H) && !defined(__DragonFly__) && !defined(HAVE_LIBELF_H)
> #include <link.h>
> #endif
> #include <paths.h>
This version works, and I've committed it. Thank you!
Thomas
Home |
Main Index |
Thread Index |
Old Index