From 35ae591664ca3deb624fae9bbbd398b5927aba1a Mon Sep 17 00:00:00 2001
From: Florian Schmaus <flo@geekplace.eu>
Date: Mon, 22 Dec 2025 13:14:47 +0100
Subject: [PATCH] struct: fix incompatible pointer type

Fix an incompatible pointer type diagnostic by using type_id_t instead
of uint16_t for class_id.

See also https://bugs.gentoo.org/920522 and
https://github.com/taviso/ctypes.sh/issues/63
---
 src/struct/struct.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/struct/struct.c b/src/struct/struct.c
index 449d007..a6a179c 100644
--- a/src/struct/struct.c
+++ b/src/struct/struct.c
@@ -403,7 +403,7 @@ struct tag *find_anon_struct_typedef(struct cu *cu, const char *typename)
 // search it to see if it contains something we're interested in.
 static enum load_steal_kind create_array_stealer(struct cu *cu, struct conf_load *conf_load)
 {
-    static uint16_t class_id;
+    static type_id_t class_id;
     struct tag *tag;
     struct cookie *cookie = conf_load->cookie;
     char *path;
@@ -431,7 +431,7 @@ static enum load_steal_kind create_array_stealer(struct cu *cu, struct conf_load
 // search it to see if it contains something we're interested in.
 static enum load_steal_kind find_sizeof_stealer(struct cu *cu, struct conf_load *conf_load)
 {
-    static uint16_t class_id;
+    static type_id_t class_id;
     struct tag *tag;
     struct cookie *cookie = conf_load->cookie;
 
