From c986e61c97d849d1f2c1119a7e47b2b2304c5a3c Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 30 Mar 2020 13:36:16 -0700 Subject: [PATCH] Replace long with time_t Fixes compilation error with 64-bit time_t. --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 7f2edec..09bc8b9 100644 --- a/src/main.c +++ b/src/main.c @@ -252,7 +252,7 @@ void packet_handler_ex(const struct pcap_pkthdr* header, const u_char* pkt_data, if (handle == NULL || pcap_sendpacket(handle, pkt_data, header->len) != 0) { //error detected - long nowTime; + time_t nowTime; time(&nowTime); if (nowTime - cfg.init_time > ERRTIMEOUT && header->len < 1500) { @@ -282,7 +282,7 @@ void packet_handler_ex(const struct pcap_pkthdr* header, const u_char* pkt_data, if (handle == NULL || pcap_sendpacket(handle, buf, header->len) != 0) { //error detected - long nowTime; + time_t nowTime; time(&nowTime); if (nowTime - cfg.init_time > ERRTIMEOUT && header->len < 1500) {