lm-sensors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brendan Heading <brendanheading@gmail.com>
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] compilation under musl
Date: Sun, 30 Aug 2015 21:21:00 +0000	[thread overview]
Message-ID: <CA+BsyQ7oUSF73bHio+L9pZGTTzsYbWmSVifgXTR_4zRrABShMA@mail.gmail.com> (raw)

Hi guys,

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 ? :

http://git.alpinelinux.org/cgit/aports/plain/main/lm_sensors/musl-fix-includes.patch?idþce1d19448dbd3a56fd8ac70443116187141848

Is there any chance that this patch could be considered for inclusion
in the main lm-sensors tree ?

regards

Brendan

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

             reply	other threads:[~2015-08-30 21:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-30 21:21 Brendan Heading [this message]
2015-08-31  7:37 ` [lm-sensors] compilation under musl Jean Delvare
2015-08-31 12:19 ` Brendan Heading

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+BsyQ7oUSF73bHio+L9pZGTTzsYbWmSVifgXTR_4zRrABShMA@mail.gmail.com \
    --to=brendanheading@gmail.com \
    --cc=lm-sensors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).