If you replace any C headers, you must replace them in pairs. For example, if you replace <time.h>, you should also replace <ctime>.
Replacement headers must have the same effects as the versions being replaced. That is, the various runtime libraries such as libCrun, libC, libCstd, libc, and librwtool are built using the definitions in the standard headers. If your replacements do not match, your program is unlikely to work.