[dpdk-dev] [PATCH v2 7/7] eal/windows: do not expose POSIX symbols

Dmitry Kozlyuk dmitry.kozliuk at gmail.com
Sun Feb 21 11:24:10 CET 2021


On Sun, 21 Feb 2021 08:59:50 +0000, Tal Shnaiderman wrote:
[...]
> > -#ifndef close
> > -#define close _close
> > -#endif  
> 
> mlx5 uses close() in mlx5.c and is broken after this change above, BTW why not add an rte_close instead of local definition?

I'm reluctant to add file manipulation API to EAL. It would be replication of
POSIX with "rte_" prefix, while standard C has everything needed to deal with
files (and IOCTLs are platform-specific code anyway). I think libraries and
PMDs striving to be cross-platform should move to using FILE* some day. For
now, local definitions keep them running without any risk of breakage.

Thanks for all your comments, it's weird I didn't hit the failures locally.
Will fix in v3.


More information about the dev mailing list