Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cast comparison functions to __compar_fn_t if stdlib.h defines it.

  • Loading branch information...
commit c71e70aee0a463ec909117089975e51ac0f13828 1 parent 97bf284
@amejia1 amejia1 authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 libarchive/archive_write_set_format_iso9660.c
View
10 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++)
Please sign in to comment.
Something went wrong with that request. Please try again.