From 56f955aca6231693fe797de4793f77ed58ab116e Mon Sep 17 00:00:00 2001 From: Bruno Cichon Date: Mon, 1 Oct 2018 01:51:03 +0200 Subject: Add some base packages for ppc64le --- libre-testing/mdadm/linux-3.0.patch | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 libre-testing/mdadm/linux-3.0.patch (limited to 'libre-testing/mdadm/linux-3.0.patch') diff --git a/libre-testing/mdadm/linux-3.0.patch b/libre-testing/mdadm/linux-3.0.patch new file mode 100644 index 000000000..cd9d5473c --- /dev/null +++ b/libre-testing/mdadm/linux-3.0.patch @@ -0,0 +1,45 @@ +From f161d047eed634b3380262767f955eb888502e88 Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Fri, 17 Jun 2011 22:49:24 +1000 +Subject: [PATCH 1/1] util: correctly parse shorter linux version numbers. + +The next version of Linux might be 3.0. If it is, get_linux_version +will fail. +So make it more robust. + +Reported-by: Namhyung Kim +Reported-by: Milan Broz +Signed-off-by: NeilBrown +--- + util.c | 10 +++++----- + 1 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/util.c b/util.c +index 10bbe56..55d171a 100644 +--- a/util.c ++++ b/util.c +@@ -146,16 +146,16 @@ int get_linux_version() + { + struct utsname name; + char *cp; +- int a,b,c; ++ int a = 0, b = 0,c = 0; + if (uname(&name) <0) + return -1; + + cp = name.release; + a = strtoul(cp, &cp, 10); +- if (*cp != '.') return -1; +- b = strtoul(cp+1, &cp, 10); +- if (*cp != '.') return -1; +- c = strtoul(cp+1, NULL, 10); ++ if (*cp == '.') ++ b = strtoul(cp+1, &cp, 10); ++ if (*cp == '.') ++ c = strtoul(cp+1, &cp, 10); + + return (a*1000000)+(b*1000)+c; + } +-- +1.7.2.3 + -- cgit v1.2.3