From 40a3986edb9f40cece98e12f26e07046e01c734f Mon Sep 17 00:00:00 2001 From: Shubham Chakraborty Date: Tue, 14 Apr 2026 11:21:29 +0530 Subject: [PATCH] package/util-linux: fix LSMT_ROOT fallback definition The fallback definition for LSMT_ROOT was incorrectly guarded with #ifdef instead of #ifndef, making it ineffective. This caused build issues on configurations with musl 1.2.6, which defines SYS_statmount making util-linux consider statmount() as available, but having older kernel headers, not providing LSMT_ROOT. Fixes: http://autobuild.buildroot.net/results/ac2bc633db0c605564c79bfdfa0e257a9b4f1b28/ Signed-off-by: Shubham Chakraborty Signed-off-by: Thomas Petazzoni (cherry picked from commit f0540ff5317db497510a6b5beec0e406d09373cf) Signed-off-by: Thomas Perale --- ...api-utils.h-fix-LSMT_ROOT-definition.patch | 44 +++++++++++++++++++ ...api-utils.h-fix-LSMT_ROOT-definition.patch | 44 +++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 package/util-linux/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch create mode 100644 package/util-linux/util-linux-libs/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch diff --git a/package/util-linux/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch b/package/util-linux/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch new file mode 100644 index 0000000000..d98c225500 --- /dev/null +++ b/package/util-linux/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch @@ -0,0 +1,44 @@ +From 72ff3b8998a675900fcb7c18c0e03f1552b13a8b Mon Sep 17 00:00:00 2001 +From: Shubham Chakraborty +Date: Tue, 14 Apr 2026 11:04:08 +0530 +Subject: [PATCH] include/mount-api-utils.h: fix LSMT_ROOT definition + +Commit +ded434a63f3eee7fd7805b18d6c9bb912016c3c8 ("include/mount-api-utils: +add statmount and listmount") introduce a fallback definition for the +LSMT_ROOT defined, but a small typo makes this fallback definition +ineffective: + + #ifdef LSMT_ROOT + # define LSMT_ROOT ... + #endif + +Should obviously have been: + + #ifndef LSMT_ROOT + # define LSMT_ROOT ... + #endif + +Signed-off-by: Shubham Chakraborty +Upstream: https://lore.kernel.org/util-linux/20260530094932.2351791-1-thomas.petazzoni@bootlin.com/T/#u +Signed-off-by: Thomas Petazzoni +--- + include/mount-api-utils.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/mount-api-utils.h b/include/mount-api-utils.h +index a916f99..87e173e 100644 +--- a/include/mount-api-utils.h ++++ b/include/mount-api-utils.h +@@ -339,7 +339,7 @@ struct ul_statmount { + /* + * Special @mnt_id values that can be passed to listmount + */ +-#ifdef LSMT_ROOT ++#ifndef LSMT_ROOT + # define LSMT_ROOT 0xffffffffffffffff /* root mount */ + #endif + +-- +2.53.0 + diff --git a/package/util-linux/util-linux-libs/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch b/package/util-linux/util-linux-libs/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch new file mode 100644 index 0000000000..d98c225500 --- /dev/null +++ b/package/util-linux/util-linux-libs/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch @@ -0,0 +1,44 @@ +From 72ff3b8998a675900fcb7c18c0e03f1552b13a8b Mon Sep 17 00:00:00 2001 +From: Shubham Chakraborty +Date: Tue, 14 Apr 2026 11:04:08 +0530 +Subject: [PATCH] include/mount-api-utils.h: fix LSMT_ROOT definition + +Commit +ded434a63f3eee7fd7805b18d6c9bb912016c3c8 ("include/mount-api-utils: +add statmount and listmount") introduce a fallback definition for the +LSMT_ROOT defined, but a small typo makes this fallback definition +ineffective: + + #ifdef LSMT_ROOT + # define LSMT_ROOT ... + #endif + +Should obviously have been: + + #ifndef LSMT_ROOT + # define LSMT_ROOT ... + #endif + +Signed-off-by: Shubham Chakraborty +Upstream: https://lore.kernel.org/util-linux/20260530094932.2351791-1-thomas.petazzoni@bootlin.com/T/#u +Signed-off-by: Thomas Petazzoni +--- + include/mount-api-utils.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/mount-api-utils.h b/include/mount-api-utils.h +index a916f99..87e173e 100644 +--- a/include/mount-api-utils.h ++++ b/include/mount-api-utils.h +@@ -339,7 +339,7 @@ struct ul_statmount { + /* + * Special @mnt_id values that can be passed to listmount + */ +-#ifdef LSMT_ROOT ++#ifndef LSMT_ROOT + # define LSMT_ROOT 0xffffffffffffffff /* root mount */ + #endif + +-- +2.53.0 +