aboutsummaryrefslogtreecommitdiff
path: root/core/e2fsprogs/patches/fix-musl.patch
blob: 5a53ed1be8d7d03148f2d694ee2c0d196aaa825f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Previous versions only used qsort, so I am basically reverting this change
so that it works in Musl. qsort_r isn't defined in Musl.

Cem Keylan

--- a/e2fsck/rehash.c	2021-02-03 12:11:27.912285401 +0300
+++ b/e2fsck/rehash.c	2021-02-03 12:12:18.213423881 +0300
@@ -1048,11 +1048,11 @@
 	/* Sort the list */
 resort:
 	if (fd.compress && fd.num_array > 1)
-		qsort_r(fd.harray+2, fd.num_array-2, sizeof(struct hash_entry),
-			hash_cmp, &name_cmp_ctx);
+		qsort(fd.harray+2, fd.num_array-2, sizeof(struct hash_entry),
+			hash_cmp);
 	else
-		qsort_r(fd.harray, fd.num_array, sizeof(struct hash_entry),
-			hash_cmp, &name_cmp_ctx);
+		qsort(fd.harray, fd.num_array, sizeof(struct hash_entry),
+			hash_cmp);
 
 	/*
 	 * Look for duplicates