From b90aeed90e044684ed484856c74901c26d258f25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20N=C3=A9ri?= Date: Mon, 11 Nov 2024 23:06:03 +0100 Subject: [PATCH] nvme-print: add fallback for non-standard locale category MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LC_MEASUREMENT is a GNU (libc) extension - fall back to LC_ALL if it's not defined. Fixes build with musl libc Signed-off-by: Daniel Néri --- nvme-print.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nvme-print.c b/nvme-print.c index 170e5c12fb..5b1f2e827a 100644 --- a/nvme-print.c +++ b/nvme-print.c @@ -797,6 +797,10 @@ static bool is_fahrenheit_country(const char *country) return false; } +#ifndef LC_MEASUREMENT +#define LC_MEASUREMENT LC_ALL +#endif + static bool is_temperature_fahrenheit(void) { const char *locale, *underscore;