Skip to content

Commit 9444ce0

Browse files
dneigaw
authored andcommitted
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 <[email protected]>
1 parent b96cd2d commit 9444ce0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

nvme-print.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,10 @@ static bool is_fahrenheit_country(const char *country)
797797
return false;
798798
}
799799

800+
#ifndef LC_MEASUREMENT
801+
#define LC_MEASUREMENT LC_ALL
802+
#endif
803+
800804
static bool is_temperature_fahrenheit(void)
801805
{
802806
const char *locale, *underscore;

0 commit comments

Comments
 (0)