Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/decpcap.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@
#ifndef __DECPCAP_H
#define __DECPCAP_H

/* Compatibility typedefs — u_char/u_short/u_int were removed
from <sys/types.h> in C23 (GCC 15 default -std=gnu23).
Must come before <pcap.h> 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 <pcap.h>
#include <stdbool.h>
#include <stdio.h>
Expand Down