From c64955485e9b44b32dfbe1a0903b3321f811dab8 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Fri, 12 Aug 2016 14:42:33 -0400 Subject: [PATCH] Add missing patch to git Signed-off-by: Jes Sorensen --- mdadm-3.4.1-fix-some-type-comparison.patch | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 mdadm-3.4.1-fix-some-type-comparison.patch diff --git a/mdadm-3.4.1-fix-some-type-comparison.patch b/mdadm-3.4.1-fix-some-type-comparison.patch new file mode 100644 index 0000000..39a6d37 --- /dev/null +++ b/mdadm-3.4.1-fix-some-type-comparison.patch @@ -0,0 +1,41 @@ +commit 1d13b599607e48446273913ce594931ba53df9fd +Author: Xiao Ni +Date: Sat Feb 6 09:18:41 2016 +0800 + + Fix some type comparison problems + + As 26714713cd2bad9e0bf7f4669f6cc4659ceaab6c said, 32 bit signed + timestamps will overflow in the year 2038. It already changed the + utime and ctime in struct mdu_array_info_s from int to unsigned + int. So we need to change the values that compared with them to + unsigned int too. + + Signed-off-by : Xiao Ni + Signed-off-by: Jes Sorensen + +diff --git a/Monitor.c b/Monitor.c +index f19c2e5..6df80f9 100644 +--- a/Monitor.c ++++ b/Monitor.c +@@ -33,7 +33,7 @@ + struct state { + char *devname; + char devnm[32]; /* to sync with mdstat info */ +- long utime; ++ unsigned int utime; + int err; + char *spare_group; + int active, working, failed, spare, raid; +diff --git a/util.c b/util.c +index 970d484..6e7d3fb 100644 +--- a/util.c ++++ b/util.c +@@ -1267,7 +1267,7 @@ struct supertype *guess_super_type(int fd, enum guess_types guess_type) + */ + struct superswitch *ss; + struct supertype *st; +- time_t besttime = 0; ++ unsigned int besttime = 0; + int bestsuper = -1; + int i; +