gentoo-ebuilds/sys-apps/apparmor/files/apparmor-4.0.3-convert-uint-to-unsigned-int.patch
Z. Liu 9c2b1d35b8
sys-apps/apparmor: fix musl build
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/42389
Closes: https://github.com/gentoo/gentoo/pull/42389
Signed-off-by: Sam James <sam@gentoo.org>
2025-06-02 22:39:32 +01:00

37 lines
1.2 KiB
Diff

inspired by upstream fix in commit ff03702fdebb6c6c55532a6768b404706823c339
https://gitlab.com/apparmor/apparmor/-/commit/ff03702fdebb6c6c55532a6768b404706823c339
diff --git a/parser/rule.h b/parser/rule.h
index 05dbed1..e041f31 100644
--- a/rule.h
+++ b/rule.h
@@ -208,13 +208,13 @@ public:
}
int cmp(prefixes const &rhs) const {
- if ((uint) audit < (uint) rhs.audit)
+ if ((unsigned int) audit < (unsigned int) rhs.audit)
return -1;
- if ((uint) audit > (uint) rhs.audit)
+ if ((unsigned int) audit > (unsigned int) rhs.audit)
return 1;
- if ((uint) rule_mode < (uint) rhs.rule_mode)
+ if ((unsigned int) rule_mode < (unsigned int) rhs.rule_mode)
return -1;
- if ((uint) rule_mode > (uint) rhs.rule_mode)
+ if ((unsigned int) rule_mode > (unsigned int) rhs.rule_mode)
return 1;
if (owner < rhs.owner)
return -1;
@@ -224,9 +224,9 @@ public:
}
bool operator<(prefixes const &rhs) const {
- if ((uint) audit < (uint) rhs.audit)
+ if ((unsigned int) audit < (unsigned int) rhs.audit)
return true;
- if ((uint) rule_mode < (uint) rhs.rule_mode)
+ if ((unsigned int) rule_mode < (unsigned int) rhs.rule_mode)
return true;
if (owner < rhs.owner)
return true;