void-packages/srcpkgs/rrdtool/patches/set_fallback_first_weekday_...

40 lines
1.2 KiB
Diff

From 784a3913e64bd10ec544945f2c05c354677a726a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jean-Michel=20Vourg=C3=A8re?= <nirgal@debian.org>
Date: Sun, 16 Jun 2019 08:07:32 +0200
Subject: [PATCH] Set fallback first_weekday to 0 (fix #1012)
- Set first_weekday to 0 (Sunday), when HAVE__NL_TIME_WEEK_1STDAY
is not defined
- Fixes: https://github.com/oetiker/rrdtool-1.x/issues/1012
---
src/rrd_graph.c | 2 +-
src/rrd_rpncalc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/rrd_graph.c b/src/rrd_graph.c
index f5d2cdec5..62c3e645f 100644
--- a/src/rrd_graph.c
+++ b/src/rrd_graph.c
@@ -1568,7 +1568,7 @@ static int find_first_weekday(
}
first_weekday = (week_1stday + first_weekday - 1) % 7;
#else
- first_weekday = 1;
+ first_weekday = 0;
#endif
}
return first_weekday;
diff --git a/src/rrd_rpncalc.c b/src/rrd_rpncalc.c
index 0f54c6be6..84f692119 100644
--- a/src/rrd_rpncalc.c
+++ b/src/rrd_rpncalc.c
@@ -564,7 +564,7 @@ static int find_first_weekday(void){
}
first_weekday=(week_1stday + first_weekday - 1) % 7;
#else
- first_weekday = 1;
+ first_weekday = 0;
#endif
}
return first_weekday;