mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 07:44:21 +08:00
bb4b5c08a8
For arm32 xdp sockets mmap2 is preferred, so use it if it's defined. Declaration of __NR_mmap can be skipped and it breaks build. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Acked-by: Jonathan Lemon <jonathan.lemon@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
20 lines
337 B
C
20 lines
337 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include <uapi/linux/unistd.h>
|
|
#include <linux/kbuild.h>
|
|
|
|
#define SYSNR(_NR) DEFINE(SYS ## _NR, _NR)
|
|
|
|
void syscall_defines(void)
|
|
{
|
|
COMMENT("Linux system call numbers.");
|
|
SYSNR(__NR_write);
|
|
SYSNR(__NR_read);
|
|
#ifdef __NR_mmap2
|
|
SYSNR(__NR_mmap2);
|
|
#endif
|
|
#ifdef __NR_mmap
|
|
SYSNR(__NR_mmap);
|
|
#endif
|
|
|
|
}
|