Browse Source

Make ysfx compatible with FreeBSD

tags/v2.5.1
Jean Pierre Cimalando Filipe Coelho <falktx@falktx.com> 3 years ago
parent
commit
9e2defbba8
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      source/modules/ysfx/sources/ysfx_utils_fts.cpp

+ 7
- 1
source/modules/ysfx/sources/ysfx_utils_fts.cpp View File

@@ -36,7 +36,13 @@ void visit_directories(const char *rootpath, bool (*visit)(const std::string &,
#ifndef __EMSCRIPTEN__
char *argv[] = {(char *)rootpath, nullptr};

auto compar = [](const FTSENT **a, const FTSENT **b) -> int {
#if !defined(__FreeBSD__)
using compar_arg_t = const FTSENT **;
#else
using compar_arg_t = const FTSENT *const *;
#endif

auto compar = [](compar_arg_t a, compar_arg_t b) -> int {
return strcmp((*a)->fts_name, (*b)->fts_name);
};



Loading…
Cancel
Save