Index: src/libged/attr.c
===================================================================
--- src/libged/attr.c	(revision 59091)
+++ src/libged/attr.c	(working copy)
@@ -42,10 +42,10 @@
 
 
 /*
- * avs attribute comparison function, e.g. for qsort
+ * avs attribute comparison function, e.g. for bu_sort
  */
 HIDDEN int
-attr_cmp(const void *p1, const void *p2)
+attr_cmp(const void *p1, const void *p2, void *UNUSED(arg))
 {
     return bu_strcmp(((struct bu_attribute_value_pair *)p1)->name,
 		     ((struct bu_attribute_value_pair *)p2)->name);
@@ -53,7 +53,7 @@
 
 
 HIDDEN int
-attr_cmp_nocase(const void *p1, const void *p2)
+attr_cmp_nocase(const void *p1, const void *p2, void *UNUSED(arg))
 {
     return bu_strcasecmp(((struct bu_attribute_value_pair *)p1)->name,
 			 ((struct bu_attribute_value_pair *)p2)->name);
@@ -61,7 +61,7 @@
 
 
 HIDDEN int
-attr_cmp_value(const void *p1, const void *p2)
+attr_cmp_value(const void *p1, const void *p2, void *UNUSED(arg))
 {
     return bu_strcmp(((struct bu_attribute_value_pair *)p1)->value,
 		     ((struct bu_attribute_value_pair *)p2)->value);
@@ -69,7 +69,7 @@
 
 
 HIDDEN int
-attr_cmp_value_nocase(const void *p1, const void *p2)
+attr_cmp_value_nocase(const void *p1, const void *p2, void *UNUSED(arg))
 {
     return bu_strcasecmp(((struct bu_attribute_value_pair *)p1)->value,
 			 ((struct bu_attribute_value_pair *)p2)->value);
@@ -230,7 +230,7 @@
     }
 
     /* default: sort attribute-value set array by attribute name (case sensitive) */
-    qsort(&avs.avp[0], avs.count, sizeof(struct bu_attribute_value_pair), attr_cmp);
+    bu_sort(&avs.avp[0], avs.count, sizeof(struct bu_attribute_value_pair), attr_cmp, NULL);
 
     if (scmd == ATTR_SORT) {
 	/* pretty print */
@@ -243,11 +243,11 @@
 	} else {
 	    /* argv[3] is the sort type: 'case', 'nocase', 'value', 'value-nocase' */
 	    if (BU_STR_EQUIV(argv[3], NOCASE)) {
-		qsort(&avs.avp[0], avs.count, sizeof(struct bu_attribute_value_pair), attr_cmp_nocase);
+		bu_sort(&avs.avp[0], avs.count, sizeof(struct bu_attribute_value_pair), attr_cmp_nocase, NULL);
 	    } else if (BU_STR_EQUIV(argv[3], VALUE)) {
-		qsort(&avs.avp[0], avs.count, sizeof(struct bu_attribute_value_pair), attr_cmp_value);
+		bu_sort(&avs.avp[0], avs.count, sizeof(struct bu_attribute_value_pair), attr_cmp_value, NULL);
 	    } else if (BU_STR_EQUIV(argv[3], VALUE_NOCASE)) {
-		qsort(&avs.avp[0], avs.count, sizeof(struct bu_attribute_value_pair), attr_cmp_value_nocase);
+		bu_sort(&avs.avp[0], avs.count, sizeof(struct bu_attribute_value_pair), attr_cmp_value_nocase, NULL);
 	    } else if (BU_STR_EQUIV(argv[3], CASE)) {
 		; /* don't need to do anything since this is the existing (default) sort */
 	    }
Index: src/libged/comb.c
===================================================================
--- src/libged/comb.c	(revision 59091)
+++ src/libged/comb.c	(working copy)
@@ -202,9 +202,9 @@
     return GED_OK;
 }
 
-/* QSort functions for solids */
+/* bu_sort functions for solids */
 HIDDEN int
-name_compare(const void *d1, const void *d2)
+name_compare(const void *d1, const void *d2, void *UNUSED(arg))
 {
     struct directory *dp1 = *(struct directory **)d1;
     struct directory *dp2 = *(struct directory **)d2;
@@ -220,7 +220,7 @@
  *
  *  Run the first search, and quit if any non-union ops are present.
  *  If all clear, search for the solid and comb lists.  Clear the old
- *  tree and union in all the solids - solids are sorted via qsort.
+ *  tree and union in all the solids - solids are sorted via bu_sort.
  *  If we have combs, run the not-in-this-comb-tree search and check
  *  which (if any) of the combs under the current comb are not used
  *  elsewhere.  For those that are not, remove them.
@@ -284,7 +284,7 @@
 
     /* Sort the solids and union them into a new tree for dp */
     if (BU_PTBL_LEN(solids)) {
-	qsort((genptr_t)BU_PTBL_BASEADDR(solids), BU_PTBL_LEN(solids), sizeof(struct directory *), name_compare);
+	bu_sort((void *)BU_PTBL_BASEADDR(solids), BU_PTBL_LEN(solids), sizeof(struct directory *), name_compare, NULL);
 	for (BU_PTBL_FOR(dp_curr, (struct directory **), solids)) {
 	    /* add "child" comb to the newly cleared parent */
 	    if (_ged_combadd(gedp, (*dp_curr), dp->d_namep, 0, WMOP_UNION, 0, 0) == RT_DIR_NULL) {
