This commit is contained in:
Christian Rosentreter 2024-04-23 06:38:10 +02:00 committed by GitHub
commit 8324704d19
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) {
fdatasync(pcap_fd); #if defined(_POSIX_SYNCHRONIZED_IO) && (_POSIX_SYNCHRONIZED_IO > 0)
fdatasync(pcap_fd);
#else
fsync(pcap_fd);
#endif
close(pcap_fd); close(pcap_fd);
return 0; return 0;
} }