Example projects that #include ustdlib.h will generate compile errors when using the C++ compiler.
Even though the header file contains a #ifdef __cplusplus block that includes extern "C" declarations for the library functions, the declarations themselves contain errors.
First, several of the declarations make use of the restrict keyword. While this is a C99 keyword, it is not a C++ keyword.
Second, the declaration of unsprintf contains an extraneous pair of braces:
extern "C" {int usnprintf(char * s, size_t n, const char * format, ...)};
Moreover, the code in ustdlib.c contains the restrict keyword in the function definitions. The function definitions need to have #ifdef __cplusplus blocks to either include the restrict keyword or not.
Or perhaps it makes more sense to just remove the use of restrict completely to avoid the conflict between C and C++ options? I just added the following at the beginning of ustdlib.c:
#ifdef __cplusplus
#define restrict
#endif