From: Andres Mejia Date: Thu, 7 Feb 2013 21:57:22 +0000 (-0500) Subject: Cast comparison functions to __compar_fn_t if stdlib.h defines it. X-Git-Tag: v3.1.2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c71e70aee0a463ec909117089975e51ac0f13828;p=thirdparty%2Flibarchive.git Cast comparison functions to __compar_fn_t if stdlib.h defines it. --- diff --git a/libarchive/archive_write_set_format_iso9660.c b/libarchive/archive_write_set_format_iso9660.c index 7bdcd0199..591370298 100644 --- a/libarchive/archive_write_set_format_iso9660.c +++ b/libarchive/archive_write_set_format_iso9660.c @@ -6918,12 +6918,22 @@ isoent_make_path_table_2(struct archive_write *a, struct vdd *vdd, switch (vdd->vdd_type) { case VDD_PRIMARY: case VDD_ENHANCED: +#ifdef __COMPAR_FN_T + qsort(enttbl, pt->cnt, sizeof(struct isoent *), + (__compar_fn_t)_compare_path_table); +#else qsort(enttbl, pt->cnt, sizeof(struct isoent *), _compare_path_table); +#endif break; case VDD_JOLIET: +#ifdef __COMPAR_FN_T + qsort(enttbl, pt->cnt, sizeof(struct isoent *), + (__compar_fn_t)_compare_path_table_joliet); +#else qsort(enttbl, pt->cnt, sizeof(struct isoent *), _compare_path_table_joliet); +#endif break; } for (i = 0; i < pt->cnt; i++)