public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: selftests: elf: Include <endian.h> instead of <bits/endian.h>
@ 2026-04-09 16:40 Hisam Mehboob
  0 siblings, 0 replies; only message in thread
From: Hisam Mehboob @ 2026-04-09 16:40 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini, Shuah Khan
  Cc: Brigham Campbell, kvm, linux-kselftest, linux-kernel,
	Hisam Mehboob

<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: 6089ae0bd5e1 ("kvm: selftests: add sync_regs_test")
Signed-off-by: Hisam Mehboob <hisamshar@gmail.com>
---
 tools/testing/selftests/kvm/lib/elf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/kvm/lib/elf.c b/tools/testing/selftests/kvm/lib/elf.c
index f34d926d9735..620531a669cd 100644
--- a/tools/testing/selftests/kvm/lib/elf.c
+++ b/tools/testing/selftests/kvm/lib/elf.c
@@ -7,7 +7,7 @@
 
 #include "test_util.h"
 
-#include <bits/endian.h>
+#include <endian.h>
 #include <linux/elf.h>
 
 #include "kvm_util.h"
-- 
2.51.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-09 16:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-09 16:40 [PATCH] KVM: selftests: elf: Include <endian.h> instead of <bits/endian.h> Hisam Mehboob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox