From 16fb0b537585f859906d96fd329b931dfe1ad7ee Mon Sep 17 00:00:00 2001 From: Kimplul Date: Tue, 16 Sep 2025 21:43:31 +0300 Subject: fix vec on non-glibc systems --- include/conts/vec.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/conts/vec.h b/include/conts/vec.h index b8dfde9..6fad1c6 100644 --- a/include/conts/vec.h +++ b/include/conts/vec.h @@ -106,7 +106,8 @@ static inline void VEC(destroy)(struct VEC_STRUCT *v) { typedef int (*VEC(comp_t))(VEC_TYPE *a, VEC_TYPE *b); static inline void VEC(sort)(struct VEC_STRUCT *v, VEC(comp_t) comp) { - qsort(v->buf, v->n, sizeof(VEC_TYPE), (__compar_fn_t)comp); + qsort(v->buf, v->n, sizeof(VEC_TYPE), + (int(*)(const void *, const void *))comp); } static inline VEC_TYPE *VEC(reserve)(struct VEC_STRUCT *v, size_t n) -- cgit v1.2.3