freebsd-ports/devel/libpci/files/patch-lib-ecam.c
Po-Chuan Hsieh 4fd677b1f6
devel/libpci: Update to 3.10.0
- Convert FreeBSD 12 extra patch to a normal patch

Changes:	https://github.com/pciutils/pciutils/blob/master/ChangeLog
2023-05-08 00:03:11 +08:00

14 lines
475 B
C

--- lib/ecam.c.orig 2023-03-05 13:45:24 UTC
+++ lib/ecam.c
@@ -924,7 +924,11 @@ ecam_init(struct pci_access *a)
if (!validate_addrs(addrs))
a->error("Option ecam.addrs has invalid address format \"%s\".", addrs);
+#if defined(O_DSYNC)
a->fd = open(devmem, (a->writeable ? O_RDWR : O_RDONLY) | O_DSYNC);
+#else
+ a->fd = open(devmem, (a->writeable ? O_RDWR : O_RDONLY));
+#endif
if (a->fd < 0)
a->error("Cannot open %s: %s.", devmem, strerror(errno));