Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
pkg_repo_create: fix compiler warning (fts api difference)
Daniel Kolesa committed 4 years ago
commit 1b3929a5b64408b5a0eee4ea14d3520d7d35e85c
parent 4083f21
1 file changed +7 -1
modified libpkg/pkg_repo_create.c
@@ -558,8 +558,14 @@ pkg_create_repo_read_pipe(int fd, struct digest_list_entry **dlist)
	return (EPKG_OK);
}

+
#ifdef __linux__
+
typedef const FTSENT *FTSENTP;
+
#else
+
typedef const FTSENT *const FTSENTP;
+
#endif
+

static int
-
fts_compare(const FTSENT *const *a, const FTSENT *const *b)
+
fts_compare(FTSENTP *a, FTSENTP *b)
{
	/* Sort files before directories, then alpha order */
	if ((*a)->fts_info != FTS_D && (*b)->fts_info == FTS_D)