From a28786097da1096e29b3951db745d18fead7093c Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 6 Dec 2019 20:26:49 +0100 Subject: Fix for bba to make it portable --- bba/main.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bba/main.cc') diff --git a/bba/main.cc b/bba/main.cc index 9d7f9f8f..fc53a4d8 100644 --- a/bba/main.cc +++ b/bba/main.cc @@ -19,6 +19,7 @@ */ #include +#include #include #include #include @@ -446,8 +447,7 @@ int main(int argc, char **argv) fprintf(fileOut, "%s\n", s.c_str()); fprintf(fileOut, "const char %s[%d] =\n", streams[0].name.c_str(), int(data.size()) + 1); - char *bin_basename_buf = strdup(files.at(2).c_str()); - fprintf(fileOut, "#embed_str \"%s\"\n", basename(bin_basename_buf)); + fprintf(fileOut, "#embed_str \"%s\"\n",boost::filesystem::basename(files.at(2)).c_str()); fprintf(fileOut, ";\n"); for (auto &s : postText) -- cgit v1.2.3 From 7220f456ef08dce93c63cc7185b1caaf5934e67b Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 6 Dec 2019 20:39:35 +0100 Subject: proper formating --- bba/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bba/main.cc') diff --git a/bba/main.cc b/bba/main.cc index fc53a4d8..bff42028 100644 --- a/bba/main.cc +++ b/bba/main.cc @@ -447,7 +447,7 @@ int main(int argc, char **argv) fprintf(fileOut, "%s\n", s.c_str()); fprintf(fileOut, "const char %s[%d] =\n", streams[0].name.c_str(), int(data.size()) + 1); - fprintf(fileOut, "#embed_str \"%s\"\n",boost::filesystem::basename(files.at(2)).c_str()); + fprintf(fileOut, "#embed_str \"%s\"\n", boost::filesystem::basename(files.at(2)).c_str()); fprintf(fileOut, ";\n"); for (auto &s : postText) -- cgit v1.2.3