michallenc commented on code in PR #18521: URL: https://github.com/apache/nuttx/pull/18521#discussion_r2911896391
########## include/stdlib.h: ########## @@ -95,7 +95,16 @@ struct div_s int rem; /* Remainder */ }; +/* Guard typedefs when the toolchain's stdlib.h (e.g. newlib) has already + * defined div_t/ldiv_t/lldiv_t. This can occur in C++ builds that use + * CONFIG_LIBCXXTOOLCHAIN where the toolchain's <cstdlib> pulls in its own + * stdlib.h via #include_next, and NuttX's stdlib.h is later included + * through the NuttX header chain. + */ + +#ifndef _STDLIB_H_ Review Comment: These guards should be added as a separate commit so it's clear there was a change in the code and not just in docs. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
