On Sun, 17 Jan 2021 10:10:39 -0800, Stephen Hemminger wrote: 
> > -   *buffer = malloc(size);
> > +   *buffer = (char *)malloc(size);
> >     if (*buffer == NULL)
> >             return -1;
> >    
> 
> Why is the compiler enforcing C++ rules on code that is inside "extern C {"?

Code inside extern "C" is not compiled as C; directive only affects linkage.

> Bigger question is why is this code inlined? It is not critical path
> and should be a function.

Absolutely.
There's more: windows/rte_os.h should not expose POSIX symbols at all, I'm
working on a patchset to clean it up and un-inline this code.

Reply via email to