diff options
-rw-r--r-- | meta-oe/recipes-support/lm_sensors/lmsensors/0001-prog-Do-not-limit-sys-io.h-header-include-to-just-gl.patch | 88 | ||||
-rw-r--r-- | meta-oe/recipes-support/lm_sensors/lmsensors_3.4.0.bb | 6 |
2 files changed, 94 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/lm_sensors/lmsensors/0001-prog-Do-not-limit-sys-io.h-header-include-to-just-gl.patch b/meta-oe/recipes-support/lm_sensors/lmsensors/0001-prog-Do-not-limit-sys-io.h-header-include-to-just-gl.patch new file mode 100644 index 000000000..fb3878dc3 --- /dev/null +++ b/meta-oe/recipes-support/lm_sensors/lmsensors/0001-prog-Do-not-limit-sys-io.h-header-include-to-just-gl.patch | |||
@@ -0,0 +1,88 @@ | |||
1 | From 727524453f115ddc05109e9bbb3d0e60a7db9185 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 16 Jul 2017 15:05:50 -0700 | ||
4 | Subject: [PATCH] prog: Do not limit sys/io.h header include to just glibc | ||
5 | |||
6 | musl provides it too. | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | prog/dump/isadump.c | 6 ------ | ||
11 | prog/dump/isaset.c | 6 ------ | ||
12 | prog/dump/superio.c | 5 ----- | ||
13 | prog/dump/util.c | 5 ----- | ||
14 | 4 files changed, 22 deletions(-) | ||
15 | |||
16 | diff --git a/prog/dump/isadump.c b/prog/dump/isadump.c | ||
17 | index e0e6f00..8794537 100644 | ||
18 | --- a/prog/dump/isadump.c | ||
19 | +++ b/prog/dump/isadump.c | ||
20 | @@ -36,13 +36,7 @@ | ||
21 | #include "util.h" | ||
22 | #include "superio.h" | ||
23 | |||
24 | - | ||
25 | -/* To keep glibc2 happy */ | ||
26 | -#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 | ||
27 | #include <sys/io.h> | ||
28 | -#else | ||
29 | -#include <asm/io.h> | ||
30 | -#endif | ||
31 | |||
32 | #ifdef __powerpc__ | ||
33 | unsigned long isa_io_base = 0; /* XXX for now */ | ||
34 | diff --git a/prog/dump/isaset.c b/prog/dump/isaset.c | ||
35 | index e743755..85a4f64 100644 | ||
36 | --- a/prog/dump/isaset.c | ||
37 | +++ b/prog/dump/isaset.c | ||
38 | @@ -32,13 +32,7 @@ | ||
39 | #include <string.h> | ||
40 | #include "util.h" | ||
41 | |||
42 | - | ||
43 | -/* To keep glibc2 happy */ | ||
44 | -#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 | ||
45 | #include <sys/io.h> | ||
46 | -#else | ||
47 | -#include <asm/io.h> | ||
48 | -#endif | ||
49 | |||
50 | #ifdef __powerpc__ | ||
51 | unsigned long isa_io_base = 0; /* XXX for now */ | ||
52 | diff --git a/prog/dump/superio.c b/prog/dump/superio.c | ||
53 | index 64ef27b..906fe55 100644 | ||
54 | --- a/prog/dump/superio.c | ||
55 | +++ b/prog/dump/superio.c | ||
56 | @@ -20,12 +20,7 @@ | ||
57 | */ | ||
58 | |||
59 | #include <stdlib.h> | ||
60 | - | ||
61 | -#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 | ||
62 | #include <sys/io.h> | ||
63 | -#else | ||
64 | -#include <asm/io.h> | ||
65 | -#endif | ||
66 | |||
67 | #include "superio.h" | ||
68 | |||
69 | diff --git a/prog/dump/util.c b/prog/dump/util.c | ||
70 | index 874c1b9..197fa64 100644 | ||
71 | --- a/prog/dump/util.c | ||
72 | +++ b/prog/dump/util.c | ||
73 | @@ -11,12 +11,7 @@ | ||
74 | #include <stdio.h> | ||
75 | #include "util.h" | ||
76 | |||
77 | -/* To keep glibc2 happy */ | ||
78 | -#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 | ||
79 | #include <sys/io.h> | ||
80 | -#else | ||
81 | -#include <asm/io.h> | ||
82 | -#endif | ||
83 | |||
84 | /* Return 1 if we should continue, 0 if we should abort */ | ||
85 | int user_ack(int def) | ||
86 | -- | ||
87 | 2.13.3 | ||
88 | |||
diff --git a/meta-oe/recipes-support/lm_sensors/lmsensors_3.4.0.bb b/meta-oe/recipes-support/lm_sensors/lmsensors_3.4.0.bb index dbc05a898..454a69f40 100644 --- a/meta-oe/recipes-support/lm_sensors/lmsensors_3.4.0.bb +++ b/meta-oe/recipes-support/lm_sensors/lmsensors_3.4.0.bb | |||
@@ -11,6 +11,7 @@ SRC_URI = "https://github.com/groeck/lm-sensors/archive/V3-4-0.tar.gz \ | |||
11 | file://fancontrol.init \ | 11 | file://fancontrol.init \ |
12 | file://sensord.init \ | 12 | file://sensord.init \ |
13 | file://0001-lmsensors-sensors-detect-print-a-special-message-whe.patch \ | 13 | file://0001-lmsensors-sensors-detect-print-a-special-message-whe.patch \ |
14 | file://0001-prog-Do-not-limit-sys-io.h-header-include-to-just-gl.patch \ | ||
14 | " | 15 | " |
15 | SRC_URI[md5sum] = "1e9f117cbfa11be1955adc96df71eadb" | 16 | SRC_URI[md5sum] = "1e9f117cbfa11be1955adc96df71eadb" |
16 | SRC_URI[sha256sum] = "e334c1c2b06f7290e3e66bdae330a5d36054701ffd47a5dde7a06f9a7402cb4e" | 17 | SRC_URI[sha256sum] = "e334c1c2b06f7290e3e66bdae330a5d36054701ffd47a5dde7a06f9a7402cb4e" |
@@ -37,6 +38,11 @@ EXTRA_OEMAKE = 'EXLDFLAGS="${LDFLAGS}" \ | |||
37 | CC="${CC}" AR="${AR}"' | 38 | CC="${CC}" AR="${AR}"' |
38 | 39 | ||
39 | do_compile() { | 40 | do_compile() { |
41 | sed -i -e 's:^# \(PROG_EXTRA\):\1:' ${S}/Makefile | ||
42 | # Respect LDFLAGS | ||
43 | sed -i -e 's/\$(LIBDIR)$/\$(LIBDIR) \$(LDFLAGS)/g' ${S}/Makefile | ||
44 | sed -i -e 's/\$(LIBSHSONAME) -o/$(LIBSHSONAME) \$(LDFLAGS) -o/g' \ | ||
45 | ${S}/lib/Module.mk | ||
40 | oe_runmake user PROG_EXTRA="sensors sensord" | 46 | oe_runmake user PROG_EXTRA="sensors sensord" |
41 | } | 47 | } |
42 | 48 | ||