elf-helpers: make sure config.h is included first
Commit Message
Before this change, verify-elf used to complain on x86 and armv7:
verify-elf: ERROR: ./usr/lib/libabigail.so.2.0.0: uses non-LFS functions: open
Include config.h in abg-elf-helpers.cc before other headers so that
AC_SYS_LARGEFILE applies to this file. This fully enables LFS
in those of 32-bit systems that do not enable it by default.
* src/abg-elf-helpers.cc: Include "config.h" first.
Fixes: 7bd69830520f ("Make Front Ends first class citizens")
Signed-off-by: Dmitry V. Levin <ldv@strace.io>
---
src/abg-elf-helpers.cc | 1 +
1 file changed, 1 insertion(+)
Comments
Hello Dmitry,
"Dmitry V. Levin" <ldv@strace.io> a écrit:
> Before this change, verify-elf used to complain on x86 and armv7:
> verify-elf: ERROR: ./usr/lib/libabigail.so.2.0.0: uses non-LFS functions: open
>
> Include config.h in abg-elf-helpers.cc before other headers so that
> AC_SYS_LARGEFILE applies to this file. This fully enables LFS
> in those of 32-bit systems that do not enable it by default.
>
> * src/abg-elf-helpers.cc: Include "config.h" first.
>
> Fixes: 7bd69830520f ("Make Front Ends first class citizens")
> Signed-off-by: Dmitry V. Levin <ldv@strace.io>
This looks good to me so I have applied to patch to the master branch
upstream.
Thanks a lot for your contribution.
[...]
Cheers,
@@ -6,6 +6,7 @@
/// @file
///
/// This contains the definitions of the ELF utilities for the dwarf reader.
+#include "config.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>