diff --git a/0001-use-correct-sort-method-in-test-array.patch b/0001-use-correct-sort-method-in-test-array.patch new file mode 100644 index 0000000..c6eb0d6 --- /dev/null +++ b/0001-use-correct-sort-method-in-test-array.patch @@ -0,0 +1,42 @@ +From 813357548c7f9063996783e2ac8382501e32a4ed Mon Sep 17 00:00:00 2001 +From: Marcus Meissner +Date: Fri, 6 Mar 2015 08:57:10 +0100 +Subject: [PATCH] use correct sort method in test-array +Status: mailed to upstream + +the pointers we get are char ** not char * +--- + testsuite/test-array.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/testsuite/test-array.c b/testsuite/test-array.c +index 3c72a8a..8e1b2ba 100644 +--- a/testsuite/test-array.c ++++ b/testsuite/test-array.c +@@ -90,6 +90,14 @@ static int test_array_append_unique(const struct test *t) + DEFINE_TEST(test_array_append_unique, + .description = "test array append unique"); + ++static int array_strcmp(void *a, void *b) ++{ ++ char *pa = *(char **)a; ++ char *pb = *(char **)b; ++ ++ return strcmp(pa, pb); ++} ++ + static int test_array_sort(const struct test *t) + { + struct array array; +@@ -104,7 +112,7 @@ static int test_array_sort(const struct test *t) + array_append(&array, c2); + array_append(&array, c3); + array_append(&array, c1); +- array_sort(&array, (int (*)(const void *a, const void *b)) strcmp); ++ array_sort(&array, (int (*)(const void *a, const void *b)) array_strcmp); + assert_return(array.count == 6, EXIT_FAILURE); + assert_return(array.array[0] == c1, EXIT_FAILURE); + assert_return(array.array[1] == c1, EXIT_FAILURE); +-- +2.1.4 + diff --git a/kmod.changes b/kmod.changes index 169c881..19b7508 100644 --- a/kmod.changes +++ b/kmod.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 6 07:58:19 UTC 2015 - meissner@suse.com + +- 0001-use-correct-sort-method-in-test-array.patch: use correct test + bsc#920930 + ------------------------------------------------------------------- Sun Feb 22 10:41:40 UTC 2015 - meissner@suse.com diff --git a/kmod.spec b/kmod.spec index 3cb51e7..d1b67d8 100644 --- a/kmod.spec +++ b/kmod.spec @@ -36,6 +36,7 @@ Patch3: 0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch Patch4: 0010-modprobe-Implement-allow-unsupported-modules.patch Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch Patch6: kmod-blacklist-fixtest.patch +Patch7: 0001-use-correct-sort-method-in-test-array.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -100,7 +101,7 @@ in %lname. %prep %setup -q -%patch -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -p1 +%patch -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -P 7 -p1 %build autoreconf -fi