2019-07-22 23:32:41 +02:00
|
|
|
diff -uNr libpciaccess-0.16/src/linux_sysfs.c libpciaccess-0.16.mod/src/linux_sysfs.c
|
|
|
|
--- libpciaccess-0.16/src/linux_sysfs.c 2019-07-17 19:25:27.000000000 +0300
|
2019-07-23 00:37:00 +02:00
|
|
|
+++ libpciaccess-0.16.mod/src/linux_sysfs.c 2019-07-23 01:36:18.607882465 +0300
|
|
|
|
@@ -50,7 +50,7 @@
|
|
|
|
#include <dirent.h>
|
|
|
|
#include <errno.h>
|
|
|
|
|
|
|
|
-#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
+#if (defined(__i386__) || defined(__x86_64__)) && !defined(__ANDROID__)
|
|
|
|
#include <sys/io.h>
|
|
|
|
#else
|
|
|
|
#define inb(x) -1
|
2019-07-22 23:32:41 +02:00
|
|
|
@@ -462,7 +462,7 @@
|
2019-07-23 00:37:00 +02:00
|
|
|
|
|
|
|
|
2018-11-20 23:46:09 +01:00
|
|
|
while ( temp_size > 0 ) {
|
|
|
|
- const ssize_t bytes = pread64( fd, data_bytes, temp_size, offset );
|
|
|
|
+ const ssize_t bytes = pread( fd, data_bytes, temp_size, offset );
|
2019-07-23 00:37:00 +02:00
|
|
|
|
2018-11-20 23:46:09 +01:00
|
|
|
/* If zero bytes were read, then we assume it's the end of the
|
|
|
|
* config file.
|
2019-07-22 23:32:41 +02:00
|
|
|
@@ -522,7 +522,7 @@
|
2019-07-23 00:37:00 +02:00
|
|
|
|
|
|
|
|
2018-11-20 23:46:09 +01:00
|
|
|
while ( temp_size > 0 ) {
|
|
|
|
- const ssize_t bytes = pwrite64( fd, data_bytes, temp_size, offset );
|
|
|
|
+ const ssize_t bytes = pwrite( fd, data_bytes, temp_size, offset );
|
2019-07-23 00:37:00 +02:00
|
|
|
|
2018-11-20 23:46:09 +01:00
|
|
|
/* If zero bytes were written, then we assume it's the end of the
|
|
|
|
* config file.
|
2019-07-23 00:37:00 +02:00
|
|
|
@@ -890,7 +890,7 @@
|
|
|
|
} else {
|
|
|
|
ret = inl(port + handle->base);
|
|
|
|
}
|
|
|
|
-
|
|
|
|
+
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|