[compiler-rt] [compiler-rt] Fix linux header includes for musl with old kernels (PR #150621)
Caleb Zulawski via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 25 07:19:44 PDT 2025
https://github.com/calebzulawski updated https://github.com/llvm/llvm-project/pull/150621
>From b5d7389ea40295862156927d898c274e24ae3a35 Mon Sep 17 00:00:00 2001
From: Caleb Zulawski <caleb.zulawski at gmail.com>
Date: Fri, 25 Jul 2025 01:31:35 -0400
Subject: [PATCH] [compiler-rt] Fix linux header includes for musl with old
kernels
---
.../lib/sanitizer_common/sanitizer_platform_limits_posix.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
index ef4b8a85d6634..86645cee8069f 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
@@ -72,7 +72,9 @@
#include <malloc.h>
#include <mntent.h>
#include <netinet/ether.h>
+#ifndef _LINUX_SYSINFO_H
#include <sys/sysinfo.h>
+#endif
#include <sys/vt.h>
#include <linux/cdrom.h>
#include <linux/fd.h>
@@ -133,9 +135,9 @@ typedef struct user_fpregs elf_fpregset_t;
# endif
# include <scsi/scsi.h>
#else
+#include <linux/ppp_defs.h>
#include <linux/if_ppp.h>
#include <linux/kd.h>
-#include <linux/ppp_defs.h>
#endif // SANITIZER_GLIBC
#if SANITIZER_ANDROID
More information about the llvm-commits
mailing list