From e8057a638eef3c678a16e64648f7b9027a380bde Mon Sep 17 00:00:00 2001 From: se Date: Sun, 13 Dec 2020 09:38:50 +0000 Subject: [PATCH] Fix WITHOUT_ICONV build There was an unprotected use of nl_langinfo() to determine the order of day vs. month in the generated output. When building without ICONV support, the order will be: month, day. --- usr.bin/calendar/events.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.bin/calendar/events.c b/usr.bin/calendar/events.c index 1df2357fb95..1dee2fd7477 100644 --- a/usr.bin/calendar/events.c +++ b/usr.bin/calendar/events.c @@ -202,9 +202,13 @@ event_print_all(FILE *fp) struct event *e; struct tm tm; char dbuf[80]; +#ifdef WITH_ICONV static int d_first; d_first = (*nl_langinfo(D_MD_ORDER) == 'd'); +#else +#define d_first 0 +#endif while (walkthrough_dates(&e) != 0) { if (e) { -- 2.45.0