]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
src: fix some include orders
authorPhilippe Antoine <pantoine@oisf.net>
Fri, 16 Sep 2022 12:46:42 +0000 (14:46 +0200)
committerVictor Julien <vjulien@oisf.net>
Fri, 18 Nov 2022 07:27:02 +0000 (08:27 +0100)
So as to be able to get include removal right

12 files changed:
src/app-layer-enip.c
src/app-layer-htp-xff.c
src/app-layer-rfb.c
src/detect-ike-chosen-sa.c
src/output-flow.h
src/output-json.c
src/output-stats.h
src/source-pcap-file-helper.h
src/source-pcap-file.h
src/util-memcpy.h
src/util-random.c
src/util-rule-vars.h

index 87f4d5a396cbf4960bf79e4c9678818f561c309c..7c5c1bfb18f36c1a569b071f4f5330d28841830e 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 #include "suricata-common.h"
+#include "suricata.h"
 
 #include "util-debug.h"
 #include "util-byte.h"
index 1d60df3633637a2913edca02798e9cd99c644f4b..35e62aff359cfe1c8633e9510ac2f96154a3d8e6 100644 (file)
 #include "app-layer-htp.h"
 #include "app-layer-htp-xff.h"
 
-#include "util-misc.h"
+#ifndef HAVE_MEMRCHR
 #include "util-memrchr.h"
+#endif
+
+#include "util-misc.h"
 #include "util-unittest.h"
 
 /** XFF header value minimal length */
index 49f67b6d0a92da5f66c370937cfa90213df49083..829e918adc8c97580f8299622c6bf20a4ebba667 100644 (file)
@@ -32,7 +32,7 @@
 #include "app-layer-parser.h"
 #include "app-layer-rfb.h"
 
-#include "rust-bindings.h"
+#include "rust.h"
 
 static int RFBRegisterPatternsForProtocolDetection(void)
 {
index 3b7e224e4e8238ecce93e28acc834a0e98496540..2ab9fbec0ba5ad3a63af933ae3a8985125560c9f 100644 (file)
@@ -31,7 +31,7 @@
 #include "util-byte.h"
 #include "util-unittest.h"
 
-#include "rust-bindings.h"
+#include "rust.h"
 
 /**
  *   [ike.chosen_sa_attribute]:<sa_attribute>=<type>;
index 04f878419213ad2b7ee0d9f5f2dba536de386eee..2fa26660fee7ac2f0990068e991688d595d6429a 100644 (file)
@@ -26,6 +26,7 @@
 #ifndef __OUTPUT_FLOW_H__
 #define __OUTPUT_FLOW_H__
 
+#include "tm-modules.h"
 
 /** flow logger function pointer type */
 typedef int (*FlowLogger)(ThreadVars *, void *thread_data, Flow *f);
index 0b6ea4abf14f74d10fa791777da3b32c5755ece4..3fe7891bd869be0ca9e0d3c4d4ccc8c48da4b326 100644 (file)
@@ -68,7 +68,7 @@
 #include "flow-bit.h"
 #include "flow-storage.h"
 
-#include "source-pcap-file.h"
+#include "source-pcap-file-helper.h"
 
 #include "suricata-plugin.h"
 
index e5cd429b407cda65c4c46faa841c5a734bdfd12d..d2df64c343de3b0fb13e77c265b15b8ab82a8914 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef __OUTPUT_STATS_H__
 #define __OUTPUT_STATS_H__
 
+#include "tm-modules.h"
+
 typedef struct StatsRecord_ {
     const char *name;
     const char *tm_name;
index 2d98f4dc46fb151e7d5987d9fefb550946d10113..7db83b1559bf2e215287bb510310c77d03cc61fa 100644 (file)
@@ -112,4 +112,6 @@ void CleanupPcapFileFileVars(PcapFileFileVars *pfv);
  */
 TmEcode ValidateLinkType(int datalink, DecoderFunc *decoder);
 
+const char *PcapFileGetFilename(void);
+
 #endif /* __SOURCE_PCAP_FILE_HELPER_H__ */
index d864fd7e87f8c0ac983bbc5741799f53956e175f..30a3c2ec69c0b57b92d0d145de1f0b92b3c2cee6 100644 (file)
@@ -30,7 +30,6 @@ void TmModuleDecodePcapFileRegister (void);
 void PcapIncreaseInvalidChecksum(void);
 
 void PcapFileGlobalInit(void);
-const char *PcapFileGetFilename(void);
 
 #endif /* __SOURCE_PCAP_FILE_H__ */
 
index c2b8cd7997fc7bca3aa3c3793fe1f107b3e7128e..67e5ce7add4097b1a83611a73c3f27be394ece0a 100644 (file)
@@ -27,6 +27,8 @@
 #ifndef __UTIL_MEMCPY_H__
 #define __UTIL_MEMCPY_H__
 
+#include "suricata-common.h"
+
 /**
  * \internal
  * \brief Does a memcpy of the input string to lowercase.
index 0beee32878802757b9a1de93d56f54a1c7a9cf04..488e90d2399017d1f6c8880c88d16aa72e17468d 100644 (file)
@@ -61,6 +61,7 @@ static long int RandomGetPosix(void)
 #endif /* !(defined(HAVE_WINCRYPT_H) &&  defined(OS_WIN32)) */
 
 #if defined(HAVE_WINCRYPT_H) && defined(OS_WIN32)
+#include "util-debug.h"
 #include <wincrypt.h>
 
 long int RandomGet(void)
index a79e5c6c51627879467811612c445c951048fd6c..a5be2fa3a3dba3932f60f1e8192fff6d8691fcad 100644 (file)
@@ -24,6 +24,8 @@
 #ifndef __UTIL_RULE_VARS_H__
 #define __UTIL_RULE_VARS_H__
 
+#include "detect.h"
+
 /** Enum indicating the various vars type in the yaml conf file */
 typedef enum {
     SC_RULE_VARS_ADDRESS_GROUPS,