]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
bypass: fix build on Windows
authorEric Leblond <eric@regit.org>
Sat, 13 Jul 2019 08:47:40 +0000 (10:47 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 23 Aug 2019 11:42:08 +0000 (13:42 +0200)
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

index 267e2b4b52b17ff9a1b4049760cd4f10ec35ef82..7c39e8ca1527cf801fe59bc77706de9cf2da0a50 100644 (file)
 
 #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;