void-packages/srcpkgs/oprofile/patches/basename.patch

14 lines
643 B
Diff

Use internal op_basename function rather than basename.
--- pp/oparchive.cpp 2017-08-08 13:32:18.667327870 -0400
+++ pp/oparchive.cpp 2017-08-08 13:36:09.502600880 -0400
@@ -261,7 +262,7 @@
/* determine the session name of sample file */
int offset = sample_name.find('{');
string base_samples_dir = sample_name.substr(0, offset-1);
- string session = basename(base_samples_dir.c_str());
+ string session = op_basename(base_samples_dir);
/* Get rid of the the archive_path from the name */
string sample_base = sample_name.substr(offset);
string sample_archive_file = dest_samples_dir + "/" + session + "/" + sample_base;