]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
misc: include queue.h before other headers 6079/head
authorJason Ish <jason.ish@oisf.net>
Thu, 22 Apr 2021 14:52:08 +0000 (08:52 -0600)
committerJason Ish <jason.ish@oisf.net>
Fri, 23 Apr 2021 16:43:48 +0000 (10:43 -0600)
At least on FreeBSD, some other include is including "sys/queue.h"
which results in FreeBSDs /usr/include/sys/queue.h being picked
up and setting __SYS_QUEUE_H__ so our queue.h is not picked up.

But the FreeBSD queue.h does not have the CIRCLEQ definitions. To
fix just include our queue.h first, which also sets __SYS_QUEUE_H__
preventing the system one from being picked up.

(cherry picked from commit d4554ec6bb6e4e52fb2e36cf0412c981a4d1d2e9)

src/app-layer-expectation.c

index 0408086b3c76247f904cd90d9b7fd17f36b42585..d7b470f53dfaaf0c8edc929bb50e7111adfe715a 100644 (file)
@@ -52,6 +52,7 @@
  * \author Eric Leblond <eric@regit.org>
  */
 
+#include "queue.h"
 #include "suricata-common.h"
 #include "debug.h"
 
@@ -61,7 +62,6 @@
 #include "app-layer-expectation.h"
 
 #include "util-print.h"
-#include "queue.h"
 
 static int g_expectation_id = -1;
 static int g_expectation_data_id = -1;