qsort_r funny in lib/packet.c
alanz opened this issue · 0 comments
alanz commented
On linux the last two parameters of qsort_r seem to be swapped.
I need to replace
qsort_r(p->js,keys,sizeof(unsigned short)*4,p->json,pkeycmp);
with
qsort_r(p->js,keys,sizeof(unsigned short)*4,pkeycmp,p->json);
otherwise it segfaults.
What is the best way of resolving this?