4fd677b1f6
- Convert FreeBSD 12 extra patch to a normal patch Changes: https://github.com/pciutils/pciutils/blob/master/ChangeLog
14 lines
475 B
C
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));
|
|
|