mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-10-21 20:19:33 +00:00
dlm: Define __always_inline for musl
dlm_controld's rbtree headers were copied from the kernel and use __always_inline. glibc defines it in <sys/cdefs.h>, but musl does not, so the build fails on musl: ./rbtree.h:153:8: error: unknown type name '__always_inline' Add a patch that provides a fallback definition in linux_helpers.h. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
2 files changed
+35
No files matched your search
+34
@@ -0,0 +1,34 @@
|
||||
From: Khem Raj <khem.raj@oss.qualcomm.com>
|
||||
Date: Sun, 18 Oct 2026 18:30:00 -0700
|
||||
Subject: [PATCH] dlm_controld: Define __always_inline when libc does not
|
||||
|
||||
rbtree.h and rbtree_augmented.h were copied from the kernel and use
|
||||
__always_inline. glibc defines it in <sys/cdefs.h>, but musl does not,
|
||||
so the build fails on musl:
|
||||
|
||||
./rbtree.h:153:8: error: unknown type name '__always_inline'
|
||||
|
||||
Add a fallback definition to linux_helpers.h, which rbtree.h already
|
||||
includes.
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
|
||||
---
|
||||
dlm_controld/linux_helpers.h | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/dlm_controld/linux_helpers.h b/dlm_controld/linux_helpers.h
|
||||
--- a/dlm_controld/linux_helpers.h
|
||||
+++ b/dlm_controld/linux_helpers.h
|
||||
@@ -3,6 +3,11 @@
|
||||
#ifndef __DLM_LINUX_HELPERS__
|
||||
#define __DLM_LINUX_HELPERS__
|
||||
|
||||
+/* glibc provides this in <sys/cdefs.h>, but musl does not */
|
||||
+#ifndef __always_inline
|
||||
+#define __always_inline inline __attribute__((__always_inline__))
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* static_assert - check integer constant expression at build time
|
||||
*
|
||||
@@ -8,6 +8,7 @@ REQUIRED_DISTRO_FEATURES = "systemd"
|
||||
SRC_URI = "https://pagure.io/dlm/archive/dlm-${PV}/dlm-dlm-${PV}.tar.gz \
|
||||
file://0001-Include-sys-sysmacros.h-for-major-minor-macros-in-gl.patch \
|
||||
file://0001-make-Replace-cp-a-with-mode-preserving-options.patch \
|
||||
file://0002-dlm_controld-Define-__always_inline-when-libc-does-n.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "8dc23b97390236032a2fe19068c7dad23f82fb624732c9bff6898b6996c9b700"
|
||||
|
||||
Reference in new issue
Block a user