2 ms·
There are more libc's out there than just glibc and musl. The `backtrace` call is a great example. It is available in glibc and uClibc, but not musl. Instead
by dahfizz 5y ago
There are more libc's out there than just glibc and musl.
The `backtrace` call is a great example. It is available in glibc and uClibc, but not musl.
Instead of checking if using musl, and removing the backtrace call, the lack a musl define forces you to check for all the other possible libc's and assume musl is the default. This is dumb.
- hvdijk 5y agoThat is probably a bad example. That is a GNU extension, so if handling this via the preprocessor, the right guard should just be #ifdef __GLIBC__, I think. That should cover both glibc and glibc-compatible libcs such as uClibc. (Yes, uClibc does define __GLIBC__ as well.)