lm_sensors: add musl patch from alpine.

Doesn't fix build yet due to use of unconventional
object file extensions (which shouldn't matter but do).

+64
+2
pkgs/os-specific/linux/lm-sensors/default.nix
··· 20 20 buildInputs = [ bison flex which perl ] 21 21 ++ stdenv.lib.optional sensord rrdtool; 22 22 23 + patches = [ ./musl-fix-includes.patch ]; 24 + 23 25 preBuild = '' 24 26 makeFlagsArray=(PREFIX=$out ETCDIR=$out/etc 25 27 ${stdenv.lib.optionalString sensord "PROG_EXTRA=sensord"})
+62
pkgs/os-specific/linux/lm-sensors/musl-fix-includes.patch
··· 1 + --- lm_sensors-3.3.4.orig/prog/dump/isadump.c 2 + +++ lm_sensors-3.3.4/prog/dump/isadump.c 3 + @@ -36,13 +36,7 @@ 4 + #include "util.h" 5 + #include "superio.h" 6 + 7 + - 8 + -/* To keep glibc2 happy */ 9 + -#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 10 + #include <sys/io.h> 11 + -#else 12 + -#include <asm/io.h> 13 + -#endif 14 + 15 + #ifdef __powerpc__ 16 + unsigned long isa_io_base = 0; /* XXX for now */ 17 + --- lm_sensors-3.3.4.orig/prog/dump/isaset.c 18 + +++ lm_sensors-3.3.4/prog/dump/isaset.c 19 + @@ -32,13 +32,7 @@ 20 + #include <string.h> 21 + #include "util.h" 22 + 23 + - 24 + -/* To keep glibc2 happy */ 25 + -#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 26 + #include <sys/io.h> 27 + -#else 28 + -#include <asm/io.h> 29 + -#endif 30 + 31 + #ifdef __powerpc__ 32 + unsigned long isa_io_base = 0; /* XXX for now */ 33 + --- lm_sensors-3.3.4.orig/prog/dump/superio.c 34 + +++ lm_sensors-3.3.4/prog/dump/superio.c 35 + @@ -20,12 +20,7 @@ 36 + */ 37 + 38 + #include <stdlib.h> 39 + - 40 + -#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 41 + #include <sys/io.h> 42 + -#else 43 + -#include <asm/io.h> 44 + -#endif 45 + 46 + #include "superio.h" 47 + 48 + --- lm_sensors-3.3.4.orig/prog/dump/util.c 49 + +++ lm_sensors-3.3.4/prog/dump/util.c 50 + @@ -11,12 +11,7 @@ 51 + #include <stdio.h> 52 + #include "util.h" 53 + 54 + -/* To keep glibc2 happy */ 55 + -#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 56 + #include <sys/io.h> 57 + -#else 58 + -#include <asm/io.h> 59 + -#endif 60 + 61 + /* Return 1 if we should continue, 0 if we should abort */ 62 + int user_ack(int def)