summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Mejia <amejia004@gmail.com>2013-02-07 16:57:22 -0500
committerAndres Mejia <amejia004@gmail.com>2013-02-07 16:57:22 -0500
commitc71e70aee0a463ec909117089975e51ac0f13828 (patch)
treeab04e26f956ad9bbd8c0c75f4a4e2214966a02f9
parent97bf284c9bd540c6dca7c2e5c23129d460a24ccd (diff)
downloadlibarchive-c71e70aee0a463ec909117089975e51ac0f13828.tar.gz
Cast comparison functions to __compar_fn_t if stdlib.h defines it.
-rw-r--r--libarchive/archive_write_set_format_iso9660.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libarchive/archive_write_set_format_iso9660.c b/libarchive/archive_write_set_format_iso9660.c
index 7bdcd019..59137029 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++)