build fails on musl-libc based linux systems (for example alpine, void, sabotage)
Created by: rofl0r
dynamorio-release_6_1_1/core/unix/os.c: In function 'handle_close_pre':
dynamorio-release_6_1_1/core/unix/os.c:5620:30: error: dereferencing pointer to incomplete type
dynamorio-release_6_1_1/core/unix/os.c:5636:30: error: dereferencing pointer to incomplete type
dynamorio-release_6_1_1/core/unix/os.c:5652:29: error: dereferencing pointer to incomplete type
make[2]: *** [core/CMakeFiles/dynamorio.dir/unix/os.c.o] Error 1
the code in question is
/* update the privately loaded libc's stdout _fileno. */
(*privmod_stdout)->STDFILE_FILENO = our_stdout;
/* update the privately loaded libc's stderr _fileno. */
(*privmod_stderr)->STDFILE_FILENO = our_stderr;
/* update the privately loaded libc's stdout _fileno. */
(*privmod_stdin)->STDFILE_FILENO = our_stdin;
FILE is an opaque type and it's illegal to make assumptions about or access the underlying struct from non-libc code. I'm currently talking with musl's author if there's a portable solution. the code in question was introduced to fix #261