]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
dsdb: Fix the FreeBSD build
authorVolker Lendecke <vl@samba.org>
Wed, 31 Jul 2019 09:08:40 +0000 (11:08 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 6 Aug 2019 21:49:28 +0000 (21:49 +0000)
My FreeBSD install does not have __compar_fn_t. libreplace has the
QSORT_CAST for systems that do.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/dsdb/samdb/ldb_modules/count_attrs.c

index b0d1b2249441290dd20d16149fdd1375efc942df..eb762cc25aa62d9008dfaec198be9c73cc4368ea 100644 (file)
@@ -222,7 +222,7 @@ static const char **get_sorted_attrs(TALLOC_CTX *mem_ctx,
                attrs[i] = a;
        }
 
-       qsort(attrs, n_attrs, sizeof(char *), (__compar_fn_t)strcasecmp_ptr);
+       qsort(attrs, n_attrs, sizeof(char *), QSORT_CAST strcasecmp_ptr);
        return attrs;
 }
 
@@ -313,7 +313,7 @@ static int count_attrs_search_callback(struct ldb_request *req,
                        }
 
                        qsort(found_attrs, msg->num_elements, sizeof(char *),
-                             (__compar_fn_t)strcasecmp_ptr);
+                             QSORT_CAST strcasecmp_ptr);
 
 
                        /* find and report duplicates */