Skip to content

Commit 2d42c7c

Browse files
hissamsharbonzini
authored andcommitted
KVM: selftests: elf: Include <endian.h> instead of <bits/endian.h>
<bits/endian.h> is a glibc-internal header that explicitly states it should never be included directly: #error "Never use <bits/endian.h> directly; include <endian.h> instead." Replace it with the correct public header <endian.h> which works on all C libraries including musl. Building KVM selftests with musl-gcc fails with: lib/elf.c:10:10: fatal error: bits/endian.h: No such file or directory Fixes: 6089ae0 ("kvm: selftests: add sync_regs_test") Signed-off-by: Hisam Mehboob <hisamshar@gmail.com> Message-ID: <20260409164020.1575176-4-hisamshar@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 06c4f99 commit 2d42c7c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • tools/testing/selftests/kvm/lib

tools/testing/selftests/kvm/lib/elf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#include "test_util.h"
99

10-
#include <bits/endian.h>
10+
#include <endian.h>
1111
#include <linux/elf.h>
1212

1313
#include "kvm_util.h"

0 commit comments

Comments
 (0)