summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch')
-rw-r--r--meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch34
1 files changed, 34 insertions, 0 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 0000000..1707683
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch
@@ -0,0 +1,34 @@
1From f220d809be1baa654503bf6ff52f3630b0d7015c Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Wed, 26 Mar 2014 01:30:29 +0000
4Subject: [PATCH] sun.c: use qsort() to instead of qsort_r()
5
6qsort_r() was added to glibc in version 2.8, so there is no qsort_r() on
7the host like CentOS 5.x.
8
9Upstream-Status: Inappropriate [Other]
10
11Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
12---
13 libfdisk/src/sun.c | 5 ++---
14 1 file changed, 2 insertions(+), 3 deletions(-)
15
16diff --git a/libfdisk/src/sun.c b/libfdisk/src/sun.c
17index 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--
331.8.2.1
34