summaryrefslogtreecommitdiffstats
path: root/package/libv4l/0005-Add-missing-linux-bpf_common.h.patch
diff options
context:
space:
mode:
authorPeter Seiderer <ps.report@gmx.net>2018-11-02 20:01:08 +0100
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>2018-11-03 14:27:50 +0100
commitf10aa4252a9fc0332a2ffd6845a72adb3b1d9120 (patch)
treeaacf08cbc74418b43aeeb689a4bf5148a257cb41 /package/libv4l/0005-Add-missing-linux-bpf_common.h.patch
parentd9dcd5aa1a18154deb9556e6c15c0c82044a40fc (diff)
downloadbuildroot-f10aa4252a9fc0332a2ffd6845a72adb3b1d9120.tar.gz
buildroot-f10aa4252a9fc0332a2ffd6845a72adb3b1d9120.zip
package/libv4l: add missing bpf_common.h header
Fixes [1] (for older toolchains not providing this header): CC keytable.o In file included from bpf.h:26:0, from keytable.c:37: ../../include/linux/bpf.h:12:10: fatal error: linux/bpf_common.h: No such file or directory #include <linux/bpf_common.h> ^~~~~~~~~~~~~~~~~~~~ [1] http://autobuild.buildroot.org/results/d22c0939eed4bc949f7eaeae7595d01ec45cc2cd Signed-off-by: Peter Seiderer <ps.report@gmx.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'package/libv4l/0005-Add-missing-linux-bpf_common.h.patch')
-rw-r--r--package/libv4l/0005-Add-missing-linux-bpf_common.h.patch80
1 files changed, 80 insertions, 0 deletions
diff --git a/package/libv4l/0005-Add-missing-linux-bpf_common.h.patch b/package/libv4l/0005-Add-missing-linux-bpf_common.h.patch
new file mode 100644
index 0000000000..d43ea70027
--- /dev/null
+++ b/package/libv4l/0005-Add-missing-linux-bpf_common.h.patch
@@ -0,0 +1,80 @@
+From 311e344039d58cfde09dd34f14804db8ac0513c9 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Fri, 2 Nov 2018 18:58:53 +0100
+Subject: [PATCH] Add missing linux/bpf_common.h
+
+Copy from [1], needed by bpf.h.
+
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/include/uapi/linux/bpf_common.h?h=v4.19
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ include/linux/bpf_common.h | 57 ++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 57 insertions(+)
+ create mode 100644 include/linux/bpf_common.h
+
+diff --git a/include/linux/bpf_common.h b/include/linux/bpf_common.h
+new file mode 100644
+index 00000000..ee97668b
+--- /dev/null
++++ b/include/linux/bpf_common.h
+@@ -0,0 +1,57 @@
++/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
++#ifndef _UAPI__LINUX_BPF_COMMON_H__
++#define _UAPI__LINUX_BPF_COMMON_H__
++
++/* Instruction classes */
++#define BPF_CLASS(code) ((code) & 0x07)
++#define BPF_LD 0x00
++#define BPF_LDX 0x01
++#define BPF_ST 0x02
++#define BPF_STX 0x03
++#define BPF_ALU 0x04
++#define BPF_JMP 0x05
++#define BPF_RET 0x06
++#define BPF_MISC 0x07
++
++/* ld/ldx fields */
++#define BPF_SIZE(code) ((code) & 0x18)
++#define BPF_W 0x00 /* 32-bit */
++#define BPF_H 0x08 /* 16-bit */
++#define BPF_B 0x10 /* 8-bit */
++/* eBPF BPF_DW 0x18 64-bit */
++#define BPF_MODE(code) ((code) & 0xe0)
++#define BPF_IMM 0x00
++#define BPF_ABS 0x20
++#define BPF_IND 0x40
++#define BPF_MEM 0x60
++#define BPF_LEN 0x80
++#define BPF_MSH 0xa0
++
++/* alu/jmp fields */
++#define BPF_OP(code) ((code) & 0xf0)
++#define BPF_ADD 0x00
++#define BPF_SUB 0x10
++#define BPF_MUL 0x20
++#define BPF_DIV 0x30
++#define BPF_OR 0x40
++#define BPF_AND 0x50
++#define BPF_LSH 0x60
++#define BPF_RSH 0x70
++#define BPF_NEG 0x80
++#define BPF_MOD 0x90
++#define BPF_XOR 0xa0
++
++#define BPF_JA 0x00
++#define BPF_JEQ 0x10
++#define BPF_JGT 0x20
++#define BPF_JGE 0x30
++#define BPF_JSET 0x40
++#define BPF_SRC(code) ((code) & 0x08)
++#define BPF_K 0x00
++#define BPF_X 0x08
++
++#ifndef BPF_MAXINSNS
++#define BPF_MAXINSNS 4096
++#endif
++
++#endif /* _UAPI__LINUX_BPF_COMMON_H__ */
+--
+2.19.1
+
OpenPOWER on IntegriCloud