Define _GNU_SOURCE to get members of tcphdr&ucphdr
PATCH 5/6 Define _GNU_SOURCE to get members of tcphdr&ucphdr
The source uses linux names for members of tcphdr. For example "source" instead of "th_sport", ... musl libc's headers need _GNU_SOURCE defined in order to expose these.
Signed-off-by Felix Janda <[email protected]>
--- src/cthelper.c | 1 + src/helpers/ftp.c | 1 + src/helpers/sane.c | 1 + src/helpers/tns.c | 1 + 4 files changed, 4 insertions(+)
src/cthelper.c +1 -0
@@ -31,6 +31,7 @@#include <netinet/in.h> #include <netinet/ip.h> #include <netinet/ip6.h> +#define _GNU_SOURCE#include <netinet/tcp.h> #include <netinet/udp.h> #include <net/ethernet.h>
src/helpers/ftp.c +1 -0
@@ -25,6 +25,7 @@#include <ctype.h> /* for isdigit */ #include <errno.h> +#define _GNU_SOURCE#include <netinet/tcp.h> #include <libmnl/libmnl.h>
src/helpers/sane.c +1 -0
@@ -30,6 +30,7 @@#include "log.h" #include <errno.h> #include <netinet/ip.h> +#define _GNU_SOURCE#include <netinet/tcp.h> #include <libmnl/libmnl.h> #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
src/helpers/tns.c +1 -0
@@ -18,6 +18,7 @@#include <ctype.h> /* for isdigit */ #include <errno.h> +#define _GNU_SOURCE#include <netinet/tcp.h> #include <libmnl/libmnl.h>
Signature · 1 line
2.3.6