On Wed, Mar 29, 2023 at 2:07 PM Martin KaFai Lau <martin.lau@xxxxxxxxx> wrote: > > On 3/29/23 1:03 PM, James Hilliard wrote: > >>> So it looks like fork is translated to __gcov_fork when -std=gnu* is set which > >>> is why we get this error. > >>> > >>> As this appears to be intended behavior for gcc I think the best option is > >>> to just rename the function so that we don't run into issues when building > >>> with gnu extensions like -std=gnu11. > >> Is it sure 'fork' is the only culprit? If not, it is better to address it > >> properly because this unnecessary name change is annoying when switching bpf > >> prog from clang to gcc. Like changing the name in this .c here has to make > >> another change to the .c in the prog_tests/ directory. > > We've fixed a similar issue in the past by renaming to avoid a > > conflict with the builtin: > > https://github.com/torvalds/linux/commit/ab0350c743d5c93fd88742f02b3dff12168ab435 > > > > Fair enough. Please post a patch for the name change. Any suggestions/preferences on what name I should use instead?