From: Eric Leblond Date: Sat, 13 Jul 2019 08:47:40 +0000 (+0200) Subject: bypass: fix build on Windows X-Git-Tag: suricata-5.0.0-rc1~128 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5366f80941486fd7297e063c41124f0df92e1c2f;p=thirdparty%2Fsuricata.git bypass: fix build on Windows For the sake of unittests, we need to build capture bypass so we end up with a Windows build of flow bypass. --- diff --git a/src/flow-bypass.c b/src/flow-bypass.c index 267e2b4b52..7c39e8ca15 100644 --- a/src/flow-bypass.c +++ b/src/flow-bypass.c @@ -32,6 +32,13 @@ #define FLOW_BYPASS_DELAY 10 +#ifndef TIMEVAL_TO_TIMESPEC +#define TIMEVAL_TO_TIMESPEC(tv, ts) { \ + (ts)->tv_sec = (tv)->tv_sec; \ + (ts)->tv_nsec = (tv)->tv_usec * 1000; \ +} +#endif + typedef struct BypassedFlowManagerThreadData_ { uint16_t flow_bypassed_cnt_clo; uint16_t flow_bypassed_pkts;