mirror of
https://github.com/openwrt/packages.git
synced 2026-01-09 19:31:21 +00:00
lm-sensors: fix musl compatibility
Only use `asm/io.h` for uClibc, else include `sys/io.h` Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
44
utils/lm-sensors/patches/100-musl-compat.patch
Normal file
44
utils/lm-sensors/patches/100-musl-compat.patch
Normal file
@@ -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>
|
||||
Reference in New Issue
Block a user