diff options
-rw-r--r-- | include/conts/vec.h | 3 |
1 files changed, 2 insertions, 1 deletions
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) |