Re: compilation under musl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi Brendan,

On Sun, 30 Aug 2015 22:21:00 +0100, Brendan Heading wrote:
> You may be aware of the musl C-library implementation, which tries to
> be strictly standards compliant, avoids non-standard extensions, etc.
> Some distributions have adopted it as their standard C library, in
> others (such as buildroot) it is a configuration alternative.
> Vanilla lm-sensors does not compile under musl, due to the following
> excerpt which appears in four different places. The code is checking
> that the glibc version is greater than 2.0.
> #if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0
> #include <sys/io.h>
> #else
> #include <asm/io.h>
> #endif
> This fails under musl does not define __GLIBC__ (in fact, by design,
> it doesn't provide any way to identify itself at all) - which causes
> it to try to include <asm/io.h> rather than <sys/io.h>.
> It's a long time since glibc 2.0.1 was released - 1997. Accordingly,
> it seems to make little sense at this stage to try to retain
> compatibility with very old libcs - so maybe it should be removed
> entirely as per the following patch ? :
> Is there any chance that this patch could be considered for inclusion
> in the main lm-sensors tree ?

Agreed. Patch committed with further cleanups (moving <sys/...>
includes to the top of the list):

Thanks for your contribution.

Jean Delvare
SUSE L3 Support

lm-sensors mailing list

[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux