From: Volker Lendecke Date: Wed, 31 Jul 2019 09:08:40 +0000 (+0200) Subject: dsdb: Fix the FreeBSD build X-Git-Tag: tdb-1.4.2~312 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d8ae28115200196546ace109e338b55a7ae72a93;p=thirdparty%2Fsamba.git dsdb: Fix the FreeBSD build My FreeBSD install does not have __compar_fn_t. libreplace has the QSORT_CAST for systems that do. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source4/dsdb/samdb/ldb_modules/count_attrs.c b/source4/dsdb/samdb/ldb_modules/count_attrs.c index b0d1b224944..eb762cc25aa 100644 --- a/source4/dsdb/samdb/ldb_modules/count_attrs.c +++ b/source4/dsdb/samdb/ldb_modules/count_attrs.c @@ -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 */