Skip to content

Commit 96364de

Browse files
committed
bsd.
1 parent 1eff4a3 commit 96364de

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

src/file.c

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,15 @@
4040

4141
/* == Declarations ========================================================= */
4242

43-
static int _bs_file_walk_compare(const FTSENT **a, const FTSENT **b);
43+
#if defined __linux__
44+
static int _bs_file_walk_compare(
45+
const FTSENT **a,
46+
const FTSENT **b);
47+
#else
48+
static int _bs_file_walk_compare(
49+
const FTSENT * const *a,
50+
const FTSENT * const *b);
51+
#endif
4452

4553
/* == Exported methods ===================================================== */
4654

@@ -295,7 +303,16 @@ bool bs_file_walk(
295303
/* == Static (local) functions ============================================= */
296304

297305
/** Comparator to fts_open() (see fts(3)). Used when sorting is requested. */
298-
int _bs_file_walk_compare(const FTSENT **a, const FTSENT **b) {
306+
#if defined __linux__
307+
static int _bs_file_walk_compare(
308+
const FTSENT **a,
309+
const FTSENT **b)
310+
#else
311+
static int _bs_file_walk_compare(
312+
const FTSENT * const *a,
313+
const FTSENT * const *b)
314+
#endif
315+
{
299316
return strcmp((*a)->fts_name, (*b)->fts_name);
300317
}
301318

0 commit comments

Comments
 (0)