libctf: pass the thunk down properly when wrapping qsort_r
authorNick Alcock <nick.alcock@oracle.com>
Tue, 30 Jun 2020 17:02:28 +0000 (18:02 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Wed, 22 Jul 2020 16:57:52 +0000 (17:57 +0100)
commit67d4cc671b7b3c49f748546a510005333fcbc465
treeff52ed7f5ca688b4b20b9b27656cc2bf269c8cad
parente28591b3dfc3958b954fc5264e5aaa94a9855f5b
libctf: pass the thunk down properly when wrapping qsort_r

When wrapping qsort_r on a system like FreeBSD on which the compar
argument comes first, we wrap the passed arg in a thunk so we can pass
down both the caller-supplied comparator function and its argument.  We
should pass the *argument* down to the comparator, not the thunk, which
is basically random nonsense on the stack from the point of view of the
caller of qsort_r.

libctf/
ctf-decls.h (ctf_qsort_compar_thunk): Fix arg passing.
libctf/ChangeLog
libctf/ctf-decls.h
This page took 0.02525 seconds and 4 git commands to generate.