From 74d1d749596d9d60723e05be3a5e24600721a32c Mon Sep 17 00:00:00 2001 From: Matthew Macy Date: Tue, 3 Dec 2019 09:49:40 -0800 Subject: 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 Reviewed-by: Brian Behlendorf Signed-off-by: Matt Macy Closes #9663 --- include/os/linux/spl/sys/sysmacros.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/os/linux') diff --git a/include/os/linux/spl/sys/sysmacros.h b/include/os/linux/spl/sys/sysmacros.h index c9d33f407..7314588bc 100644 --- a/include/os/linux/spl/sys/sysmacros.h +++ b/include/os/linux/spl/sys/sysmacros.h @@ -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 +#define qsort(base, num, size, cmp) \ + sort(base, num, size, cmp, NULL) + +#if !defined(_KMEMUSER) && !defined(offsetof) /* avoid any possibility of clashing with version */ -- cgit v1.2.3