This commit is contained in:
Christian Rosentreter 2024-04-16 15:51:16 +00:00 committed by GitHub
commit c4cb6b2b1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -54,7 +54,11 @@ static int init_pcap_logger(void *data) {
} }
static int deinit_pcap_logger(void) { static int deinit_pcap_logger(void) {
#if defined(_POSIX_SYNCHRONIZED_IO) && (_POSIX_SYNCHRONIZED_IO > 0)
fdatasync(pcap_fd); fdatasync(pcap_fd);
#else
fsync(pcap_fd);
#endif
close(pcap_fd); close(pcap_fd);
return 0; return 0;
} }