Date: Mon, 31 Aug 2020 21:55:25 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365012 - head/lib/libc/gen Message-ID: <202008312155.07VLtPSA051131@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Mon Aug 31 21:55:25 2020 New Revision: 365012 URL: https://svnweb.freebsd.org/changeset/base/365012 Log: Fix the build of scandir_b with GCC. Use explicit typedefs for block thunk structures as in r264143. Reviewed by: kib, adrian MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26256 Modified: head/lib/libc/gen/scandir.c Modified: head/lib/libc/gen/scandir.c ============================================================================== --- head/lib/libc/gen/scandir.c Mon Aug 31 21:28:57 2020 (r365011) +++ head/lib/libc/gen/scandir.c Mon Aug 31 21:55:25 2020 (r365012) @@ -56,15 +56,18 @@ void qsort_b(void *, size_t, size_t, void *); #define SELECT(x) select(x) #endif -#ifndef I_AM_SCANDIR_B +#ifdef I_AM_SCANDIR_B +typedef DECLARE_BLOCK(int, select_block, const struct dirent *); +typedef DECLARE_BLOCK(int, dcomp_block, const struct dirent **, + const struct dirent **); +#else static int alphasort_thunk(void *thunk, const void *p1, const void *p2); #endif int #ifdef I_AM_SCANDIR_B -scandir_b(const char *dirname, struct dirent ***namelist, - DECLARE_BLOCK(int, select, const struct dirent *), - DECLARE_BLOCK(int, dcomp, const struct dirent **, const struct dirent **)) +scandir_b(const char *dirname, struct dirent ***namelist, select_block select, + dcomp_block dcomp) #else scandir(const char *dirname, struct dirent ***namelist, int (*select)(const struct dirent *), int (*dcomp)(const struct dirent **,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008312155.07VLtPSA051131>