|
| 1 | +From 6d85773537c9f277ed342f57500f784ccb2c4a3e Mon Sep 17 00:00:00 2001 |
| 2 | +From: Brendan Heading < [email protected]> |
| 3 | +Date: Sun, 30 Aug 2015 22:26:39 +0100 |
| 4 | +Subject: [PATCH 1/1] fix compilation under musl |
| 5 | + |
| 6 | +This patch removes conditional compilation elements that are designed to |
| 7 | +support glibc versions earlier than 2.0, which were causing the build |
| 8 | +to fail under musl. |
| 9 | + |
| 10 | +Based on the patch found here : |
| 11 | + |
| 12 | +http://git.alpinelinux.org/cgit/aports/plain/main/lm_sensors/musl-fix-includes.patch?id=fece1d19448dbd3a56fd8ac70443116187141848 |
| 13 | + |
| 14 | +This patch has been accepted for integration upstream and should be |
| 15 | +present in the next release. See : |
| 16 | + |
| 17 | +http://www.lm-sensors.org/changeset/6314 |
| 18 | + |
| 19 | +Signed-off-by: Brendan Heading < [email protected]> |
| 20 | +Upstream-Status: pending |
| 21 | +--- |
| 22 | + prog/dump/isadump.c | 6 ------ |
| 23 | + prog/dump/isaset.c | 6 ------ |
| 24 | + prog/dump/superio.c | 5 ----- |
| 25 | + prog/dump/util.c | 5 ----- |
| 26 | + 4 files changed, 22 deletions(-) |
| 27 | + |
| 28 | +diff --git a/prog/dump/isadump.c b/prog/dump/isadump.c |
| 29 | +index e031e47..88e4c3b 100644 |
| 30 | +--- a/prog/dump/isadump.c |
| 31 | ++++ b/prog/dump/isadump.c |
| 32 | +@@ -36,13 +36,7 @@ |
| 33 | + #include "util.h" |
| 34 | + #include "superio.h" |
| 35 | + |
| 36 | +- |
| 37 | +-/* To keep glibc2 happy */ |
| 38 | +-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 |
| 39 | + #include <sys/io.h> |
| 40 | +-#else |
| 41 | +-#include <asm/io.h> |
| 42 | +-#endif |
| 43 | + |
| 44 | + #ifdef __powerpc__ |
| 45 | + unsigned long isa_io_base = 0; /* XXX for now */ |
| 46 | +diff --git a/prog/dump/isaset.c b/prog/dump/isaset.c |
| 47 | +index 1d1bdad..a084c8a 100644 |
| 48 | +--- a/prog/dump/isaset.c |
| 49 | ++++ b/prog/dump/isaset.c |
| 50 | +@@ -32,13 +32,7 @@ |
| 51 | + #include <string.h> |
| 52 | + #include "util.h" |
| 53 | + |
| 54 | +- |
| 55 | +-/* To keep glibc2 happy */ |
| 56 | +-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 |
| 57 | + #include <sys/io.h> |
| 58 | +-#else |
| 59 | +-#include <asm/io.h> |
| 60 | +-#endif |
| 61 | + |
| 62 | + #ifdef __powerpc__ |
| 63 | + unsigned long isa_io_base = 0; /* XXX for now */ |
| 64 | +diff --git a/prog/dump/superio.c b/prog/dump/superio.c |
| 65 | +index 1af7358..31e0d78 100644 |
| 66 | +--- a/prog/dump/superio.c |
| 67 | ++++ b/prog/dump/superio.c |
| 68 | +@@ -20,12 +20,7 @@ |
| 69 | + */ |
| 70 | + |
| 71 | + #include <stdlib.h> |
| 72 | +- |
| 73 | +-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 |
| 74 | + #include <sys/io.h> |
| 75 | +-#else |
| 76 | +-#include <asm/io.h> |
| 77 | +-#endif |
| 78 | + |
| 79 | + #include "superio.h" |
| 80 | + |
| 81 | +diff --git a/prog/dump/util.c b/prog/dump/util.c |
| 82 | +index 676c339..d8b0927 100644 |
| 83 | +--- a/prog/dump/util.c |
| 84 | ++++ b/prog/dump/util.c |
| 85 | +@@ -11,12 +11,7 @@ |
| 86 | + #include <stdio.h> |
| 87 | + #include "util.h" |
| 88 | + |
| 89 | +-/* To keep glibc2 happy */ |
| 90 | +-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 |
| 91 | + #include <sys/io.h> |
| 92 | +-#else |
| 93 | +-#include <asm/io.h> |
| 94 | +-#endif |
| 95 | + |
| 96 | + /* Return 1 if we should continue, 0 if we should abort */ |
| 97 | + int user_ack(int def) |
| 98 | +-- |
| 99 | +2.4.3 |
| 100 | + |
0 commit comments