Hi, I've been experimenting with musl-libc Gentoo systems. I used the HEAD of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git I found that btrfs-progs does not compile with musl-libc, for a few reasons: * It makes use of the private glibc __always_inline macro. * Various headers that should be included are not included: linux/limits.h and limits.h. (for XATTR_SIZE_MAX and PATH_MAX) * backtrace() using execinfo.h is enabled by default; execinfo.h is glibc-specific and thus does not work on other libc's. musl does not support it, and I think uclibc also does not support it. I have worked around the problems in the following way: * Define __always_inline if __glibc__ is not defined. This is arguably the most clean solution. It would be better to simply not use the __always_inline macro (instead, use __attribute__) throughout btrfs-progs, but I was not sure what the developers would prefer. This is currently done in kerncompat.h, but you may want to move that to another file. * Include various headers where required. * If __glibc__ is not defined, define BTRFS_DISABLE_BACKTRACE. Currently the define magic happens in kerncompat, because that also where BTRFS includes execinfo. Personally, I think it would make more sense to always disable backtrace instead of enabling it by default -- but perhaps in a testing phase, enabling it by default in the sensible choice. Attached are the two patches generated with git format-patch. I am aware that this may not be required format for submitting patches -- but please give me some time to get used to the etiquette. :-) Please let me know if musl-libc (or any other libc) is a supported platform, and if so, if and how I can improve on said patches. Regards, Merlijn