From d559b798d7126b0472f052567bdd3d0c6f722bf3 Mon Sep 17 00:00:00 2001 From: Owen Rafferty Date: Wed, 26 Jul 2023 19:08:46 -0500 Subject: [PATCH] libpciaccess, nspr: fix for musl LFS64 changes --- extra/nspr/build | 2 +- wayland/libpciaccess/build | 2 ++ wayland/libpciaccess/checksums | 1 + wayland/libpciaccess/patches/lfs64.patch | 22 ++++++++++++++++++++++ wayland/libpciaccess/sources | 1 + 5 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 wayland/libpciaccess/patches/lfs64.patch diff --git a/extra/nspr/build b/extra/nspr/build index a651eb59..217eb21e 100755 --- a/extra/nspr/build +++ b/extra/nspr/build @@ -5,7 +5,7 @@ cd build # ./nspr/pr/include/md/_linux.h tests only __GLIBC__ version # to detect c-library features, list musl features here for now. -CFLAGS="$CFLAGS -D_PR_POLL_AVAILABLE -D_PR_HAVE_OFF64_T -D_PR_INET6 \ +CFLAGS="$CFLAGS -D_PR_POLL_AVAILABLE -D_PR_HAVE_LARGE_OFF_T -D_PR_INET6 \ -D_PR_HAVE_INET_NTOP -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO \ -D_PR_INET6_PROBE" \ ../nspr/configure \ diff --git a/wayland/libpciaccess/build b/wayland/libpciaccess/build index b5164b4f..c74f0e0a 100755 --- a/wayland/libpciaccess/build +++ b/wayland/libpciaccess/build @@ -1,5 +1,7 @@ #!/bin/sh -e +patch -p1 < lfs64.patch + export DESTDIR="$1" meson setup \ diff --git a/wayland/libpciaccess/checksums b/wayland/libpciaccess/checksums index 03857f5f..518d4096 100644 --- a/wayland/libpciaccess/checksums +++ b/wayland/libpciaccess/checksums @@ -1 +1,2 @@ 812c8d6a7d65ca8f963d86acb49efe9bee19cfd6546a3324a6eb1184416136a87a +68d545ace6b4ecb7e0d6929c54d9e0d395882f9ddf25914bd6f3c544a54858e9b3 diff --git a/wayland/libpciaccess/patches/lfs64.patch b/wayland/libpciaccess/patches/lfs64.patch new file mode 100644 index 00000000..88950d8a --- /dev/null +++ b/wayland/libpciaccess/patches/lfs64.patch @@ -0,0 +1,22 @@ +diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c +index d62f48c..20c800e 100644 +--- a/src/linux_sysfs.c ++++ b/src/linux_sysfs.c +@@ -462,7 +462,7 @@ pci_device_linux_sysfs_read( struct pci_device * dev, void * data, + + + 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 ); + + /* If zero bytes were read, then we assume it's the end of the + * config file. +@@ -522,7 +522,7 @@ pci_device_linux_sysfs_write( struct pci_device * dev, const void * data, + + + 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 ); + + /* If zero bytes were written, then we assume it's the end of the + * config file. diff --git a/wayland/libpciaccess/sources b/wayland/libpciaccess/sources index a4a264d3..e2c5d4dc 100644 --- a/wayland/libpciaccess/sources +++ b/wayland/libpciaccess/sources @@ -1 +1,2 @@ https://x.org/releases/individual/lib/libpciaccess-0.17.tar.xz +patches/lfs64.patch