mirror of
https://github.com/adulau/ssldump.git
synced 2024-11-21 17:07:04 +00:00
Merge pull request #102 from the-real-tokai/fix-fdatasync-osx
Fix problematic fdatasync() call on macOS
This commit is contained in:
commit
d02412720b
1 changed files with 5 additions and 1 deletions
|
@ -54,7 +54,11 @@ static int init_pcap_logger(void *data) {
|
|||
}
|
||||
|
||||
static int deinit_pcap_logger(void) {
|
||||
fdatasync(pcap_fd);
|
||||
#if defined(_POSIX_SYNCHRONIZED_IO) && (_POSIX_SYNCHRONIZED_IO > 0)
|
||||
fdatasync(pcap_fd);
|
||||
#else
|
||||
fsync(pcap_fd);
|
||||
#endif
|
||||
close(pcap_fd);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue