From 5366f80941486fd7297e063c41124f0df92e1c2f Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Sat, 13 Jul 2019 10:47:40 +0200 Subject: [PATCH] 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. --- src/flow-bypass.c | 7 +++++++ 1 file changed, 7 insertions(+) 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;