diff options
author | Alexandru Ardelean <ardeleanalex@gmail.com> | 2015-12-13 18:57:54 +0200 |
---|---|---|
committer | Alexandru Ardelean <ardeleanalex@gmail.com> | 2015-12-13 21:46:17 +0200 |
commit | 87b7d9075fb869086cdeee37de49907d9c65aec6 (patch) | |
tree | 0e969b6dedfdbd46ec3569077ece950c601dae45 /libs/ibrcommon/patches | |
parent | 315ef6bf4299f4ce320b89f7753c6ade15321b19 (diff) |
ibrcommon: fix build on musl
Build error:
```
make[6]: Entering directory `/home/sandu/work/openwrt/build_dir/target-mips_34kc_musl-1.1.11/ibrcommon-1.0.1/ibrcommon/data'
CXX BLOB.lo
CXX ConfigFile.lo
CXX File.lo
File.cpp: In member function 'std::__cxx11::string ibrcommon::File::getBasename() const':
File.cpp:229:44: error: 'basename' was not declared in this scope
return std::string(basename(_path.c_str()));
^
make[6]: *** [File.lo] Error 1
```
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Diffstat (limited to 'libs/ibrcommon/patches')
-rw-r--r-- | libs/ibrcommon/patches/001-fix-build-with-musl.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libs/ibrcommon/patches/001-fix-build-with-musl.patch b/libs/ibrcommon/patches/001-fix-build-with-musl.patch new file mode 100644 index 000000000..0d3f9c239 --- /dev/null +++ b/libs/ibrcommon/patches/001-fix-build-with-musl.patch @@ -0,0 +1,23 @@ +diff --git a/ibrcommon/data/File.cpp b/ibrcommon/data/File.cpp +index 31af4ae..9b49890 100644 +--- a/ibrcommon/data/File.cpp ++++ b/ibrcommon/data/File.cpp +@@ -35,9 +35,7 @@ + #include <cerrno> + #include <fstream> + +-#if !defined(HAVE_FEATURES_H) || defined(ANDROID) + #include <libgen.h> +-#endif + + #ifdef __WIN32__ + #include <io.h> +@@ -226,7 +224,7 @@ namespace ibrcommon + std::string File::getBasename() const + { + #if !defined(ANDROID) && defined(HAVE_FEATURES_H) +- return std::string(basename(_path.c_str())); ++ return std::string(basename((char *)_path.c_str())); + #else + char path[_path.length()+1]; + ::memcpy(&path, _path.c_str(), _path.length()+1); |