diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2014-03-26 03:01:29 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-27 09:42:05 +0000 |
commit | 8add7ae494c7dac41f42656528a39471c2c85142 (patch) | |
tree | 26d6e0163b70dc77f3127fc78ffc2ab110668eb7 /meta/recipes-core/util-linux | |
parent | cdf0d9715eca62f9bd86e0a1ae6e435b43cf8d87 (diff) | |
download | poky-8add7ae494c7dac41f42656528a39471c2c85142.tar.gz |
util-linux-native: fix qsort_r for CentOS 5.10
The qsort_r() was added to glibc in version 2.8, so there is no qsort_r() on
the host like CentOS 5.x, use qsort() to fix it since they are nearly
identical.
(From OE-Core rev: cda5310e32ce05bc54602d4c18ee2d28a53be57f)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/util-linux')
-rw-r--r-- | meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch | 34 | ||||
-rw-r--r-- | meta/recipes-core/util-linux/util-linux_2.24.1.bb | 4 |
2 files changed, 37 insertions, 1 deletions
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch b/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch new file mode 100644 index 0000000000..1707683a26 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From f220d809be1baa654503bf6ff52f3630b0d7015c Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Wed, 26 Mar 2014 01:30:29 +0000 | ||
4 | Subject: [PATCH] sun.c: use qsort() to instead of qsort_r() | ||
5 | |||
6 | qsort_r() was added to glibc in version 2.8, so there is no qsort_r() on | ||
7 | the host like CentOS 5.x. | ||
8 | |||
9 | Upstream-Status: Inappropriate [Other] | ||
10 | |||
11 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
12 | --- | ||
13 | libfdisk/src/sun.c | 5 ++--- | ||
14 | 1 file changed, 2 insertions(+), 3 deletions(-) | ||
15 | |||
16 | diff --git a/libfdisk/src/sun.c b/libfdisk/src/sun.c | ||
17 | index e73c701..f7899ec 100644 | ||
18 | --- a/libfdisk/src/sun.c | ||
19 | +++ b/libfdisk/src/sun.c | ||
20 | @@ -427,9 +427,8 @@ static int sun_verify_disklabel(struct fdisk_context *cxt) | ||
21 | else | ||
22 | array[i] = -1; | ||
23 | } | ||
24 | - qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]), | ||
25 | - (int (*)(const void *,const void *,void *)) verify_sun_cmp, | ||
26 | - verify_sun_starts); | ||
27 | + qsort(array,ARRAY_SIZE(array),sizeof(array[0]), | ||
28 | + (int (*)(const void *,const void *)) verify_sun_cmp); | ||
29 | |||
30 | if (array[0] == -1) { | ||
31 | fdisk_info(cxt, _("No partitions defined.")); | ||
32 | -- | ||
33 | 1.8.2.1 | ||
34 | |||
diff --git a/meta/recipes-core/util-linux/util-linux_2.24.1.bb b/meta/recipes-core/util-linux/util-linux_2.24.1.bb index aa98b65e40..ab80ab6af9 100644 --- a/meta/recipes-core/util-linux/util-linux_2.24.1.bb +++ b/meta/recipes-core/util-linux/util-linux_2.24.1.bb | |||
@@ -4,7 +4,9 @@ require util-linux.inc | |||
4 | # To support older hosts, we need to patch and/or revert | 4 | # To support older hosts, we need to patch and/or revert |
5 | # some upstream changes. Only do this for native packages. | 5 | # some upstream changes. Only do this for native packages. |
6 | OLDHOST = "" | 6 | OLDHOST = "" |
7 | OLDHOST_class-native = "file://util-linux-native.patch" | 7 | OLDHOST_class-native = "file://util-linux-native.patch \ |
8 | file://util-linux-native-qsort.patch \ | ||
9 | " | ||
8 | 10 | ||
9 | SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \ | 11 | SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \ |
10 | file://util-linux-ng-2.16-mount_lock_path.patch \ | 12 | file://util-linux-ng-2.16-mount_lock_path.patch \ |