Use qsort_s() from C11 Annex K to make string_list_sort() safer, in particular when called from parallel threads. compat: add qsort_s() add QSORT_S string-list: use QSORT_S in string_list_sort() Makefile | 10 ++++++++ compat/qsort_s.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ git-compat-util.h | 11 +++++++++ string-list.c | 13 ++++------- 4 files changed, 95 insertions(+), 8 deletions(-) create mode 100644 compat/qsort_s.c -- 2.11.0