32 lines
846 B
Diff
32 lines
846 B
Diff
From 9444ce03a27b8d423f8170cf75f56d48d8a0a659 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Daniel=20N=C3=A9ri?= <dne+commits@rb67.eu>
|
|
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 <dne+commits@rb67.eu>
|
|
---
|
|
nvme-print.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
--- a/nvme-print.c
|
|
+++ b/nvme-print.c
|
|
@@ -832,6 +832,10 @@ static bool is_fahrenheit_country(const
|
|
#define LC_MEASUREMENT LC_ALL
|
|
#endif
|
|
|
|
+#ifndef LC_MEASUREMENT
|
|
+#define LC_MEASUREMENT LC_ALL
|
|
+#endif
|
|
+
|
|
static bool is_temperature_fahrenheit(void)
|
|
{
|
|
const char *locale, *underscore;
|