libsmbios: fix musl
This commit is contained in:
parent
9a5ba145ac
commit
d80d08c0fc
|
@ -0,0 +1,36 @@
|
|||
--- src/libsmbios_c/smi/smi_linux.c.orig 2019-02-07 22:09:34.240465062 +0100
|
||||
+++ src/libsmbios_c/smi/smi_linux.c 2019-02-07 22:09:41.937466022 +0100
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <string.h>
|
||||
#include <sys/file.h> // flock
|
||||
#include <sys/ioctl.h> // ioctl
|
||||
+#include <fcntl.h> // open
|
||||
#include <errno.h>
|
||||
|
||||
// public
|
||||
--- src/libsmbios_c/common/platform/linux.h.orig 2019-02-07 22:17:16.671522730 +0100
|
||||
+++ src/libsmbios_c/common/platform/linux.h 2019-02-07 22:17:36.932525256 +0100
|
||||
@@ -1,3 +1,23 @@
|
||||
+#if !defined(__GLIBC__) && !defined(LL_IO)
|
||||
+#define LL_IO
|
||||
+// inb_p and outb_p: imported from glibc
|
||||
+static __inline unsigned char
|
||||
+inb_p (unsigned short int __port)
|
||||
+{
|
||||
+ unsigned char _v;
|
||||
+
|
||||
+ __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
|
||||
+ return _v;
|
||||
+}
|
||||
+
|
||||
+static __inline void
|
||||
+outb_p (unsigned char __value, unsigned short int __port)
|
||||
+{
|
||||
+ __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value),
|
||||
+ "Nd" (__port));
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
// If we are on IA64 we will need to macro define inb_p and outb_p
|
||||
#if defined(__ia64__)
|
||||
# define outb_p outb
|
|
@ -19,11 +19,6 @@ subpackages="libsmbios-devel python3-libsmbios libsmbios-utils"
|
|||
|
||||
only_for_archs="i686 i686-musl x86_64 x86_64-musl"
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl )
|
||||
broken="requires glibc specific outb_p and inb_p" ;;
|
||||
esac
|
||||
|
||||
pre_configure() {
|
||||
./autogen.sh --no-configure
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue