From: Daniel Néri Date: Mon, 11 Nov 2024 22:06:03 +0000 (+0100) Subject: nvme-print: add fallback for non-standard locale category X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9444ce03a27b8d423f8170cf75f56d48d8a0a659;p=users%2Fsagi%2Fnvme-cli.git nvme-print: add fallback for non-standard locale category 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 --- diff --git a/nvme-print.c b/nvme-print.c index 170e5c12..5b1f2e82 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;