diff options
author | Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> | 2019-08-15 15:13:54 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-08-21 14:31:17 +0200 |
commit | 71dd77fd4bf7d1675a95dfe04a99669ce15b58f8 (patch) | |
tree | 49c78f1d277c6cba8cf008e3829bfc3ad2da8b4d /tools/lib/bpf/Makefile | |
parent | 51746f94865a165e66d34ab74403810d31eae951 (diff) | |
download | linux-71dd77fd4bf7d1675a95dfe04a99669ce15b58f8.tar.gz linux-71dd77fd4bf7d1675a95dfe04a99669ce15b58f8.tar.bz2 linux-71dd77fd4bf7d1675a95dfe04a99669ce15b58f8.zip |
libbpf: use LFS (_FILE_OFFSET_BITS) instead of direct mmap2 syscall
Drop __NR_mmap2 fork in flavor of LFS, that is _FILE_OFFSET_BITS=64
(glibc & bionic) / LARGEFILE64_SOURCE (for musl) decision. It allows
mmap() to use 64bit offset that is passed to mmap2 syscall. As result
pgoff is not truncated and no need to use direct access to mmap2 for
32 bits systems.
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/lib/bpf/Makefile')
-rw-r--r-- | tools/lib/bpf/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile index 148a27164189..613acb93b144 100644 --- a/tools/lib/bpf/Makefile +++ b/tools/lib/bpf/Makefile @@ -108,6 +108,7 @@ override CFLAGS += -Werror -Wall override CFLAGS += -fPIC override CFLAGS += $(INCLUDES) override CFLAGS += -fvisibility=hidden +override CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ifeq ($(VERBOSE),1) Q = |