0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-23 14:56:16 +00:00
termux-packages/root-packages/hwinfo/src-isdn-isa-probe.c.patch
Tee KOBAYASHI 6980c43606 hwinfo: Fix build for Clang 16
%ci:no-build
2023-04-14 08:56:30 +09:00

20 lines
620 B
Diff

diff -uNr hwinfo-21.60/src/isdn/isa_probe.c hwinfo-21.60.mod/src/isdn/isa_probe.c
--- hwinfo-21.60/src/isdn/isa_probe.c 2018-10-17 16:23:47.000000000 +0300
+++ hwinfo-21.60.mod/src/isdn/isa_probe.c 2019-06-26 13:35:29.558758182 +0300
@@ -1,7 +1,14 @@
#if defined(__i386__)
#include <stdio.h>
-#include <sys/io.h>
+#include <sys/syscall.h>
+#include <unistd.h>
+#define iopl(level) ((int)syscall(SYS_iopl, level))
+static __inline__ unsigned char inb(unsigned short port) {
+ unsigned char ret;
+ __asm__ __volatile__("inb %1, %0" : "=a" (ret) : "dN" (port));
+ return ret;
+}
#include "hd.h"
#include "hd_int.h"