Move linux qsort def to platform header

Moving qsort to the platform header allows each platform to
provide an appropriate sorting implementation.

Reviewed-by: Allan Jude <allanjude@freebsd.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #9663
This commit is contained in:
Matthew Macy
2019-12-03 09:49:40 -08:00
committed by Brian Behlendorf
parent e69bb31b71
commit 74d1d74959
3 changed files with 8 additions and 8 deletions
+5 -1
View File
@@ -192,7 +192,11 @@ extern void spl_cleanup(void);
#define SET_ERROR(err) \
(__set_error(__FILE__, __func__, __LINE__, err), err)
#if defined(_KERNEL) && !defined(_KMEMUSER) && !defined(offsetof)
#include <linux/sort.h>
#define qsort(base, num, size, cmp) \
sort(base, num, size, cmp, NULL)
#if !defined(_KMEMUSER) && !defined(offsetof)
/* avoid any possibility of clashing with <stddef.h> version */