Skip to content

Commit

Permalink
gprofng: 32018 Compilation of binutils 2.43 failed on CentOS 6
Browse files Browse the repository at this point in the history
strchr is redefined as a macro in /usr/include/bits/string.h on CentOS 6/7.
In this case, we may not use our CALL_UTIL macro for strchr.
Use __collector_strchr instead of "CALL_UTIL (strchr)".

gprofng/ChangeLog
2024-07-28  Vladimir Mezentsev  <[email protected]>

	PR 32018
	* libcollector/hwprofile.c (open_experiment): Use __collector_strchr.
  • Loading branch information
Vladimir Mezentsev committed Jul 30, 2024
1 parent 4e7b18d commit c4ffbc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gprofng/libcollector/hwprofile.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,13 @@ open_experiment (const char *exp)
params += 2;
break;
}
params = CALL_UTIL (strchr)(params, ';');
params = __collector_strchr (params, ';');
if (params)
params++;
}
if (params == NULL) /* HWC profiling not specified */
return COL_ERROR_HWCINIT;
char *s = CALL_UTIL (strchr)(params, (int) ';');
char *s = __collector_strchr (params, (int) ';');
int sz = s ? s - params : CALL_UTIL (strlen)(params);
char *defstring = (char*) alloca (sz + 1);
CALL_UTIL (strlcpy)(defstring, params, sz + 1);
Expand Down

0 comments on commit c4ffbc5

Please sign in to comment.