mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 08:39:28 +00:00
use O_FSYNC instead of O_SYNC in FreeBSD.
This commit is contained in:
1 parent
65d6a086d0
commit
5c6112a372
2 files changed
+17
-1
No files matched your search
+10
-1
@@ -1029,7 +1029,16 @@ serial_init (unsigned short port, unsigned int speed,
|
||||
close (serial_fd);
|
||||
|
||||
/* Open the device file. */
|
||||
serial_fd = open (serial_device, O_RDWR | O_NOCTTY | O_SYNC);
|
||||
serial_fd = open (serial_device,
|
||||
O_RDWR | O_NOCTTY
|
||||
#if defined(O_SYNC)
|
||||
/* O_SYNC is used in Linux (and some others?). */
|
||||
| O_SYNC
|
||||
#elif defined(O_FSYNC)
|
||||
/* O_FSYNC is used in FreeBSD. */
|
||||
| O_FSYNC
|
||||
#endif
|
||||
);
|
||||
if (serial_fd < 0)
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in new issue
Block a user