001-fix-build-with-musl.patch 660 B

1234567891011121314151617181920212223
  1. diff --git a/ibrcommon/data/File.cpp b/ibrcommon/data/File.cpp
  2. index 31af4ae..9b49890 100644
  3. --- a/ibrcommon/data/File.cpp
  4. +++ b/ibrcommon/data/File.cpp
  5. @@ -35,9 +35,7 @@
  6. #include <cerrno>
  7. #include <fstream>
  8. -#if !defined(HAVE_FEATURES_H) || defined(ANDROID)
  9. #include <libgen.h>
  10. -#endif
  11. #ifdef __WIN32__
  12. #include <io.h>
  13. @@ -226,7 +224,7 @@ namespace ibrcommon
  14. std::string File::getBasename() const
  15. {
  16. #if !defined(ANDROID) && defined(HAVE_FEATURES_H)
  17. - return std::string(basename(_path.c_str()));
  18. + return std::string(basename((char *)_path.c_str()));
  19. #else
  20. char path[_path.length()+1];
  21. ::memcpy(&path, _path.c_str(), _path.length()+1);