On musl libc, stdin/out/err are defined as FILE* const globals, and their address is not implicitly convertible to void *
(or at least gcc 6 doesn't allow it). Add an explicit cast to fix that problem.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
error: cannot initialize return object of type 'void *' with an rvalue of type 'FILE *const *' (aka '_IO_FILE *const *') EXPLICIT_SYMBOL(stderr); ^~~~~~~~~~~~~~~~~~~~~~~
Comment Actions
This change looks fine. I'm unsure whether the proper style is to go for cast<void*>() or similar.
Comment Actions
Has this been tested?
The modified EXPLICIT_SYMBOL is #undef at line 102 and does not apply to the EXPLICIT_SYMBOL(stdin/out/err) below.