mirror of
https://git.freebsd.org/ports.git
synced 2025-06-26 23:20:30 -04:00
- Convert FreeBSD 12 extra patch to a normal patch Changes: https://github.com/pciutils/pciutils/blob/master/ChangeLog
14 lines
545 B
C
14 lines
545 B
C
--- lib/mmio-ports.c.orig 2023-03-04 15:27:09 UTC
|
|
+++ lib/mmio-ports.c
|
|
@@ -298,7 +298,11 @@ conf1_init(struct pci_access *a)
|
|
if (!validate_addrs(addrs))
|
|
a->error("Option %s has invalid address format \"%s\".", addrs_param_name, addrs);
|
|
|
|
+#if defined(O_DSYNC)
|
|
a->fd = open(devmem, O_RDWR | O_DSYNC); /* O_DSYNC bypass CPU cache for mmap() on Linux */
|
|
+#else
|
|
+ a->fd = open(devmem, O_RDWR); /* O_DSYNC bypass CPU cache for mmap() on Linux */
|
|
+#endif
|
|
if (a->fd < 0)
|
|
a->error("Cannot open %s: %s.", devmem, strerror(errno));
|
|
}
|