I just do a check, there are two minor problems with Musl:

  1. Musl does not provide any predefined macro in order to test for its presence, like GLIBC
  2. The struct _IO_FILE is defined in src/internal/stdio_impl.h, but it is not a public API and is subject to change in the future.

For the fist problem, we can just use some thing like this:

#ifdef __MUSL__
// do some stuffs
#endif

Then, when one want to compile again Musl, just add the -D__MUSL__ to the CFLAGS when executing the configure script.

For the second problem, the added explicit definition (as i did) is not guaranteed to work in the future version of Musl since the struct _IO_FILE may be changed. It would be nice if we can find a workaround that does not involve the (re)definition of that struct.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.