mirror of
https://github.com/Waujito/youtubeUnblock.git
synced 2024-12-22 14:26:11 +00:00
Fix compilationg errors for some kernels
This commit is contained in:
parent
c0dc5d2652
commit
1e6a9496f6
2
Kbuild
2
Kbuild
@ -1,3 +1,3 @@
|
|||||||
obj-m := kyoutubeUnblock.o
|
obj-m := kyoutubeUnblock.o
|
||||||
kyoutubeUnblock-objs := kytunblock.o mangle.o quic.o utils.o kmod_utils.o
|
kyoutubeUnblock-objs := kytunblock.o mangle.o quic.o utils.o kmod_utils.o
|
||||||
ccflags-y := -std=gnu11 -DKERNEL_SPACE -Wno-error
|
ccflags-y := -std=gnu11 -DKERNEL_SPACE -Wno-error -Wno-declaration-after-statement
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
#include <linux/socket.h>
|
#include <linux/socket.h>
|
||||||
#include <linux/net.h>
|
#include <linux/net.h>
|
||||||
#include <linux/version.h>
|
|
||||||
|
|
||||||
#include <linux/netfilter.h>
|
#include <linux/netfilter.h>
|
||||||
#include <linux/netfilter_ipv4.h>
|
#include <linux/netfilter_ipv4.h>
|
||||||
|
1
types.h
1
types.h
@ -32,6 +32,7 @@ typedef __u64 uint64_t;
|
|||||||
#include <linux/ip.h> // IWYU pragma: export
|
#include <linux/ip.h> // IWYU pragma: export
|
||||||
#include <linux/ipv6.h> // IWYU pragma: export
|
#include <linux/ipv6.h> // IWYU pragma: export
|
||||||
#include <linux/tcp.h> // IWYU pragma: export
|
#include <linux/tcp.h> // IWYU pragma: export
|
||||||
|
#include <linux/version.h>
|
||||||
|
|
||||||
#define ip6_hdr ipv6hdr
|
#define ip6_hdr ipv6hdr
|
||||||
|
|
||||||
|
7
utils.c
7
utils.c
@ -7,6 +7,13 @@
|
|||||||
#include <libnetfilter_queue/libnetfilter_queue_ipv4.h>
|
#include <libnetfilter_queue/libnetfilter_queue_ipv4.h>
|
||||||
#include <libnetfilter_queue/libnetfilter_queue_ipv6.h>
|
#include <libnetfilter_queue/libnetfilter_queue_ipv6.h>
|
||||||
#include <libnetfilter_queue/libnetfilter_queue_tcp.h>
|
#include <libnetfilter_queue/libnetfilter_queue_tcp.h>
|
||||||
|
#else
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24))
|
||||||
|
#include <net/ip6_checksum.h>
|
||||||
|
#include <net/checksum.h>
|
||||||
|
#else
|
||||||
|
#include <net/checksum.h>
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user