lm-sensors: fix musl compatibility
authorJo-Philipp Wich <redacted>
Thu, 25 Jun 2015 09:38:08 +0000 (11:38 +0200)
committerJo-Philipp Wich <redacted>
Fri, 26 Jun 2015 13:10:03 +0000 (15:10 +0200)
Only use `asm/io.h` for uClibc, else include `sys/io.h`

Signed-off-by: Jo-Philipp Wich <redacted>
utils/lm-sensors/Makefile
utils/lm-sensors/patches/100-musl-compat.patch [new file with mode: 0644]

index 02faccb156d6f612e62a1aedd5b1a7f1f570a500..4dcea0cafbcb122d6dedd20fb2d301360852fdbf 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lm-sensors
 PKG_VERSION:=3.3.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=lm_sensors-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://dl.lm-sensors.org/lm-sensors/releases
diff --git a/utils/lm-sensors/patches/100-musl-compat.patch b/utils/lm-sensors/patches/100-musl-compat.patch
new file mode 100644 (file)
index 0000000..1cd82ab
--- /dev/null
@@ -0,0 +1,44 @@
+--- a/prog/dump/isadump.c
++++ b/prog/dump/isadump.c
+@@ -38,7 +38,7 @@
+ /* To keep glibc2 happy */
+-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0
++#if !defined(__UCLIBC__)
+ #include <sys/io.h>
+ #else
+ #include <asm/io.h>
+--- a/prog/dump/isaset.c
++++ b/prog/dump/isaset.c
+@@ -34,7 +34,7 @@
+ /* To keep glibc2 happy */
+-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0
++#if !defined(__UCLIBC__)
+ #include <sys/io.h>
+ #else
+ #include <asm/io.h>
+--- a/prog/dump/superio.c
++++ b/prog/dump/superio.c
+@@ -21,7 +21,7 @@
+ #include <stdlib.h>
+-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0
++#if !defined(__UCLIBC__)
+ #include <sys/io.h>
+ #else
+ #include <asm/io.h>
+--- a/prog/dump/util.c
++++ b/prog/dump/util.c
+@@ -12,7 +12,7 @@
+ #include "util.h"
+ /* To keep glibc2 happy */
+-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0
++#if !defined(__UCLIBC__)
+ #include <sys/io.h>
+ #else
+ #include <asm/io.h>
git clone https://git.99rst.org/PROJECT