summaryrefslogtreecommitdiff
path: root/user/oprofile/posixise.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/oprofile/posixise.patch')
-rw-r--r--user/oprofile/posixise.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/user/oprofile/posixise.patch b/user/oprofile/posixise.patch
new file mode 100644
index 000000000..dd2ead122
--- /dev/null
+++ b/user/oprofile/posixise.patch
@@ -0,0 +1,43 @@
+--- oprofile-1.3.0/libpe_utils/op_pe_utils.cpp.old 2018-07-16 18:58:37.000000000 +0000
++++ oprofile-1.3.0/libpe_utils/op_pe_utils.cpp 2018-10-10 20:20:10.730000000 +0000
+@@ -530,7 +530,7 @@
+ static string _handle_powerpc_event_spec(string event_spec)
+ {
+ FILE * fp;
+- char line[MAX_INPUT];
++ char line[_POSIX_MAX_INPUT];
+ size_t grp_pos;
+ string evt, err_msg;
+ size_t evt_name_len;
+@@ -579,7 +579,7 @@
+ }
+
+ err_msg = "Cannot find event ";
+- while (fgets(line, MAX_INPUT, fp)) {
++ while (fgets(line, _POSIX_MAX_INPUT, fp)) {
+ if (!first_non_cyc_evt_found) {
+ if (!strncmp(line, "PM_", 3))
+ first_non_cyc_evt_found = true;
+--- oprofile-1.3.0/pe_profiling/operf.cpp.old 2016-08-08 15:03:27.000000000 +0000
++++ oprofile-1.3.0/pe_profiling/operf.cpp 2018-10-10 20:27:23.190000000 +0000
+@@ -860,9 +860,9 @@
+ {
+ if (remove(fpath)) {
+ perror("sample data removal error");
+- return FTW_STOP;
++ return -1;
+ } else {
+- return FTW_CONTINUE;
++ return 0;
+ }
+ }
+
+@@ -897,7 +897,7 @@
+ return;
+
+ if (!operf_options::append) {
+- int flags = FTW_DEPTH | FTW_ACTIONRETVAL;
++ int flags = FTW_DEPTH;
+ errno = 0;
+ if (nftw(previous_sampledir.c_str(), __delete_old_previous_sample_data, 32, flags) !=0 &&
+ errno != ENOENT) {