From 14e0262b55a66d0b9a7f6cacbf26171f8d08a343 Mon Sep 17 00:00:00 2001 From: Sojin Jang Date: Tue, 3 Sep 2024 07:50:42 +0900 Subject: [PATCH] check-deps: changed gelf function in __have_libelf.c Even though 'libelf-devel' is installed, 'libelf' is displayed as [OFF] rather than [ON] when running ./configure. Fixed : #1869 (issue : gcc -Wall -Werror: libelf: [ OFF ] even when libelf-devel is installed) Signed-off-by: Sojin Jang --- check-deps/__have_libelf.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/check-deps/__have_libelf.c b/check-deps/__have_libelf.c index bf7a9ec80..66ee1fec8 100644 --- a/check-deps/__have_libelf.c +++ b/check-deps/__have_libelf.c @@ -3,8 +3,14 @@ int main(void) { - GElf_Ehdr ehdr; + Elf *elf; - elf_version(EV_CURRENT); - return 0; + elf_version(EV_CURRENT); + + /* check that the gelf function */ + elf = elf_begin(0, ELF_C_READ, NULL); + gelf_checksum(elf); + elf_end(elf); + + return 0; }