From bfee8d3a14807632da36ca57d57c6b53ea665ffb Mon Sep 17 00:00:00 2001 From: Allen Ballway Date: Mon, 17 Nov 2025 11:28:13 -0800 Subject: [PATCH] android: support longer property names Property names no longer have a maximum length in Android 26+, support longer names to fix truncated property names. Signed-off-by: Allen Ballway Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13043 Test: vendor.mesa.custom.border.colors.without.format is untruncated Reviewed-by: Yiwei Zhang Reviewed-by: Antonio Ospite Part-of: --- src/util/os_misc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/util/os_misc.c b/src/util/os_misc.c index e7ebfcba147..a64e2b805c1 100644 --- a/src/util/os_misc.c +++ b/src/util/os_misc.c @@ -141,6 +141,16 @@ os_log_message(const char *message) # include # include "c11/threads.h" +/** + * In Android 26+ there is no restriction on the length of the name for a + * property, replace the default max length with one large enough to support + * all property names. + */ +#if ANDROID_API_LEVEL >= 26 +#undef PROPERTY_KEY_MAX +#define PROPERTY_KEY_MAX 128 +#endif /* ANDROID_API_LEVEL >= 26 */ + /** * Get an option value from android's property system, as a fallback to * getenv() (which is generally less useful on android due to processes