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-26 12:15:11 +0000 |
commit | cda5310e32ce05bc54602d4c18ee2d28a53be57f (patch) | |
tree | 43cda8016a3d9c4fb8d66dd1174e652ac338f742 | |
parent | 706055503f493a5af73240c0983c46dbe31d8fe9 (diff) | |
download | openembedded-core-cda5310e32ce05bc54602d4c18ee2d28a53be57f.tar.gz openembedded-core-cda5310e32ce05bc54602d4c18ee2d28a53be57f.tar.bz2 openembedded-core-cda5310e32ce05bc54602d4c18ee2d28a53be57f.zip |
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.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 @@ +From f220d809be1baa654503bf6ff52f3630b0d7015c Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Wed, 26 Mar 2014 01:30:29 +0000 +Subject: [PATCH] sun.c: use qsort() to instead of qsort_r() + +qsort_r() was added to glibc in version 2.8, so there is no qsort_r() on +the host like CentOS 5.x. + +Upstream-Status: Inappropriate [Other] + +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> +--- + libfdisk/src/sun.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/libfdisk/src/sun.c b/libfdisk/src/sun.c +index e73c701..f7899ec 100644 +--- a/libfdisk/src/sun.c ++++ b/libfdisk/src/sun.c +@@ -427,9 +427,8 @@ static int sun_verify_disklabel(struct fdisk_context *cxt) + else + array[i] = -1; + } +- qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]), +- (int (*)(const void *,const void *,void *)) verify_sun_cmp, +- verify_sun_starts); ++ qsort(array,ARRAY_SIZE(array),sizeof(array[0]), ++ (int (*)(const void *,const void *)) verify_sun_cmp); + + if (array[0] == -1) { + fdisk_info(cxt, _("No partitions defined.")); +-- +1.8.2.1 + 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 # To support older hosts, we need to patch and/or revert # some upstream changes. Only do this for native packages. OLDHOST = "" -OLDHOST_class-native = "file://util-linux-native.patch" +OLDHOST_class-native = "file://util-linux-native.patch \ + file://util-linux-native-qsort.patch \ + " SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \ file://util-linux-ng-2.16-mount_lock_path.patch \ |