diff --git a/src/decpcap.h b/src/decpcap.h index 6d2c86f..a65df02 100644 --- a/src/decpcap.h +++ b/src/decpcap.h @@ -22,6 +22,20 @@ #ifndef __DECPCAP_H #define __DECPCAP_H +/* Compatibility typedefs — u_char/u_short/u_int were removed + from in C23 (GCC 15 default -std=gnu23). + Must come before because libpcap uses these types. + Upstream libpcap C23 compat: https://github.com/the-tcpdump-group/libpcap/issues/1679 */ +#ifndef u_char +typedef unsigned char u_char; +#endif +#ifndef u_short +typedef unsigned short u_short; +#endif +#ifndef u_int +typedef unsigned int u_int; +#endif + #include #include #include