--- 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) { --- oprofile-1.3.0/libop/op_events.c.old 2018-01-18 16:46:48.000000000 +0000 +++ oprofile-1.3.0/libop/op_events.c 2018-10-11 00:34:04.362677027 +0000 @@ -83,7 +83,7 @@ static u64 parse_long_hex(char const * str) { u64 value; - if (sscanf(str, "%Lx", &value) != 1) + if (sscanf(str, "%llx", &value) != 1) parse_error("expected long hexadecimal value"); fflush(stderr);