Skip to content

Commit 14e0262

Browse files
committed
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 : namhyung#1869 (issue : gcc -Wall -Werror: libelf: [ OFF ] even when libelf-devel is installed) Signed-off-by: Sojin Jang <[email protected]>
1 parent 9d88589 commit 14e0262

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

check-deps/__have_libelf.c

+9-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33

44
int main(void)
55
{
6-
GElf_Ehdr ehdr;
6+
Elf *elf;
77

8-
elf_version(EV_CURRENT);
9-
return 0;
8+
elf_version(EV_CURRENT);
9+
10+
/* check that the gelf function */
11+
elf = elf_begin(0, ELF_C_READ, NULL);
12+
gelf_checksum(elf);
13+
elf_end(elf);
14+
15+
return 0;
1016
}

0 commit comments

Comments
 (0)