aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/cpu_info.c
diff options
context:
space:
mode:
authorNicolás Alvarez <nicolas.alvarez@gmail.com>2023-05-31 01:53:47 -0300
committerJoão Valverde <j@v6e.pt>2023-06-24 13:22:02 +0000
commit29eed029b3fd2639bd920ad47edff37cf8a16109 (patch)
tree01296dbc31ffa99209bd630ddc31461b8d050a9a /wsutil/cpu_info.c
parentcd9c3c639b7fc6baf1173b678168bf6f0c0990bd (diff)
Make wsutil headers include what they use and build standalone
There's many wsutil headers which used glib types like guint8 or GString but didn't include glib.h. If a new .c file included wsutil/xx.h, it would not compile if it doesn't include glib.h first. This commit adds #include <wireshark.h> to the headers in wsutil where GLib types are being used. It also makes every wsutil/xx.c file include the corresponding xx.h before including anything else, which makes the build fail if the header doesn't build standalone due to missing other includes.
Diffstat (limited to 'wsutil/cpu_info.c')
-rw-r--r--wsutil/cpu_info.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/wsutil/cpu_info.c b/wsutil/cpu_info.c
index e11069647e..a0c712d301 100644
--- a/wsutil/cpu_info.c
+++ b/wsutil/cpu_info.c
@@ -9,12 +9,11 @@
*/
#include "config.h"
+#include <wsutil/cpu_info.h>
#include <string.h>
-#include <glib.h>
#include <wsutil/ws_cpuid.h>
-#include <wsutil/cpu_info.h>
#include <wsutil/file_util.h>
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)