diff options
Diffstat (limited to 'meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch')
-rw-r--r-- | meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch b/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch new file mode 100644 index 0000000000..ee482b5ca0 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | From 835baf02fd42012bbc0603dffb1f80c6ecf0fb9e Mon Sep 17 00:00:00 2001 | ||
2 | From: Xiao Ni <xni@redhat.com> | ||
3 | Date: Mon, 8 Feb 2016 11:18:52 +0200 | ||
4 | Subject: [PATCH] Fix some type comparison problems | ||
5 | |||
6 | As 26714713cd2bad9e0bf7f4669f6cc4659ceaab6c said, 32 bit signed | ||
7 | timestamps will overflow in the year 2038. It already changed the | ||
8 | utime and ctime in struct mdu_array_info_s from int to unsigned | ||
9 | int. So we need to change the values that compared with them to | ||
10 | unsigned int too. | ||
11 | |||
12 | Upstream-Status: Backport | ||
13 | |||
14 | Signed-off-by : Xiao Ni <xni@redhat.com> | ||
15 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | ||
16 | --- | ||
17 | |||
18 | Monitor.c | 2 +- | ||
19 | util.c | 2 +- | ||
20 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/Monitor.c b/Monitor.c | ||
23 | index f19c2e5..6df80f9 100644 | ||
24 | --- a/Monitor.c | ||
25 | +++ b/Monitor.c | ||
26 | @@ -33,7 +33,7 @@ | ||
27 | struct state { | ||
28 | char *devname; | ||
29 | char devnm[32]; /* to sync with mdstat info */ | ||
30 | - long utime; | ||
31 | + unsigned int utime; | ||
32 | int err; | ||
33 | char *spare_group; | ||
34 | int active, working, failed, spare, raid; | ||
35 | diff --git a/util.c b/util.c | ||
36 | index 3e6d293..96a806d 100644 | ||
37 | --- a/util.c | ||
38 | +++ b/util.c | ||
39 | @@ -1267,7 +1267,7 @@ struct supertype *guess_super_type(int fd, enum guess_types guess_type) | ||
40 | */ | ||
41 | struct superswitch *ss; | ||
42 | struct supertype *st; | ||
43 | - time_t besttime = 0; | ||
44 | + unsigned int besttime = 0; | ||
45 | int bestsuper = -1; | ||
46 | int i; | ||
47 | |||
48 | -- | ||
49 | 2.4.0 | ||
50 | |||