From 47110757dd6f854eac7b6eb09817d8700bd4fb26 Mon Sep 17 00:00:00 2001 From: etmatrix <3065939+etmatrix@users.noreply.github.com> Date: Mon, 1 Nov 2021 17:02:28 +0100 Subject: [PATCH] fix missing define on ipv4.c --- root-packages/libnetfilter-queue/build.sh | 1 + .../fix-missing-define-ipv4.patch | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 root-packages/libnetfilter-queue/fix-missing-define-ipv4.patch diff --git a/root-packages/libnetfilter-queue/build.sh b/root-packages/libnetfilter-queue/build.sh index 4e16522a2..ea8af2ee4 100644 --- a/root-packages/libnetfilter-queue/build.sh +++ b/root-packages/libnetfilter-queue/build.sh @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="libnetfilter_queue is a userspace library providing an A TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION=1.0.5 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=http://ftp.netfilter.org/pub/libnetfilter_queue/libnetfilter_queue-${TERMUX_PKG_VERSION}.tar.bz2 TERMUX_PKG_SHA256=f9ff3c11305d6e03d81405957bdc11aea18e0d315c3e3f48da53a24ba251b9f5 TERMUX_PKG_DEPENDS="libnfnetlink, libmnl" diff --git a/root-packages/libnetfilter-queue/fix-missing-define-ipv4.patch b/root-packages/libnetfilter-queue/fix-missing-define-ipv4.patch new file mode 100644 index 000000000..dade07892 --- /dev/null +++ b/root-packages/libnetfilter-queue/fix-missing-define-ipv4.patch @@ -0,0 +1,22 @@ +diff --git a/src/extra/ipv4.c b/src/extra/ipv4.c +index 797bab1..37eae7b 100644 +--- a/src/extra/ipv4.c ++++ b/src/extra/ipv4.c +@@ -20,6 +20,17 @@ + + #include "internal.h" + ++// on debian linux system netinet/ip.h has this define ++// on ndk-sysroot there are only in linux/ip.h but include it ++// introduce an issue on redifinition ++#define IPTOS_CLASS_MASK 0xe0 ++#define IPTOS_CLASS(class) ((class) & IPTOS_CLASS_MASK) ++ ++#define IPTOS_PREC(tos) IPTOS_CLASS(tos) ++ ++#define IPTOS_TOS_MASK 0x1E ++#define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK) ++ + /** + * \defgroup ipv4 IPv4 helper functions + * @{