diff options
author | Matthew Macy <[email protected]> | 2019-12-03 09:49:40 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-12-03 09:49:40 -0800 |
commit | 74d1d749596d9d60723e05be3a5e24600721a32c (patch) | |
tree | 861b52b4c81c660d2aca32c4b2f96a62fc183668 /include | |
parent | e69bb31b71f60b338fa5510dc48de298f394ad73 (diff) |
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 <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Matt Macy <[email protected]>
Closes #9663
Diffstat (limited to 'include')
-rw-r--r-- | include/os/linux/spl/sys/sysmacros.h | 6 |
1 files changed, 5 insertions, 1 deletions
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 <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 */ |