summaryrefslogtreecommitdiff
path: root/src/bin/eolian_cxx
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-07-23 19:37:03 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-07-23 19:37:03 +0100
commita3182948ad360285116f3ddf3a225434d1c21547 (patch)
treecfe0ef1fc928922db2b658c23f45f01d425d0f68 /src/bin/eolian_cxx
parent5a67cc997da178cdfd0d58ec32e2ef4bc1fd784b (diff)
eolian: use libgen.h basename
Diffstat (limited to 'src/bin/eolian_cxx')
-rw-r--r--src/bin/eolian_cxx/eolian_wrappers.hh6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/eolian_cxx/eolian_wrappers.hh b/src/bin/eolian_cxx/eolian_wrappers.hh
index a2520d34bd..6269f37fef 100644
--- a/src/bin/eolian_cxx/eolian_wrappers.hh
+++ b/src/bin/eolian_cxx/eolian_wrappers.hh
@@ -2,6 +2,7 @@
2#define EOLIAN_CXX_EOLIAN_WRAPPERS_HH 2#define EOLIAN_CXX_EOLIAN_WRAPPERS_HH
3 3
4#include <cassert> 4#include <cassert>
5#include <libgen.h>
5 6
6#include <Eolian.h> 7#include <Eolian.h>
7 8
@@ -30,9 +31,10 @@ ctor_t const ctor = {};
30inline const Eolian_Class* 31inline const Eolian_Class*
31class_from_file(std::string const& file) 32class_from_file(std::string const& file)
32{ 33{
33 char *bn = eina_file_path_basename(file.c_str(), NULL); 34 char *dup = strdup(file.c_str());
35 char *bn = basename(dup);
34 const Eolian_Class *cl = ::eolian_class_get_by_file(bn); 36 const Eolian_Class *cl = ::eolian_class_get_by_file(bn);
35 free(bn); 37 free(dup);
36 return cl; 38 return cl;
37} 39}
38 40