commit bd089d3c8d7dedced9ab4b46a33495a57b4f7d1a
parent bf2fc9c933c1a9f22c164fa06f332ba3bfa414d4
Author: Hannu Nyman <hannu.nyman@iki.fi>
Date: Mon, 14 Dec 2015 19:40:13 +0200
Merge pull request #2120 from commodo/ibrcommon-fix-musl-build
ibrcommon: fix build on musl
Diffstat:
2 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/libs/ibrcommon/Makefile b/libs/ibrcommon/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ibrcommon
PKG_VERSION:=1.0.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
diff --git a/libs/ibrcommon/patches/001-fix-build-with-musl.patch 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);