Skip to content

Commit d03f3ed

Browse files
authored
Add recvmmsg & sendmmsg syscall number for loongarch64 (#13097)
Motivation: Call correct recvmmsg and sendmmsg on loongarch64. Modification: Add #elif declarations to ensure we pick the correct syscall number for loongarch64. Result: Pick the correct syscall number depending on the system architecture.
1 parent e530cd6 commit d03f3ed

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

transport-native-epoll/src/main/c/netty_epoll_native.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ struct mmsghdr {
102102
#elif defined(__i386__)
103103
// See https://github.com/torvalds/linux/blob/v5.4/arch/x86/entry/syscalls/syscall_32.tbl
104104
#define SYS_recvmmsg 337
105+
#elif defined(__loongarch64)
106+
// See https://github.com/torvalds/linux/blob/v6.1/include/uapi/asm-generic/unistd.h
107+
#define SYS_recvmmsg 243
105108
#else
106109
#define SYS_recvmmsg -1
107110
#endif
@@ -115,6 +118,9 @@ struct mmsghdr {
115118
#elif defined(__i386__)
116119
// See https://github.com/torvalds/linux/blob/v5.4/arch/x86/entry/syscalls/syscall_32.tbl
117120
#define SYS_sendmmsg 345
121+
#elif defined(__loongarch64)
122+
// See https://github.com/torvalds/linux/blob/v6.1/include/uapi/asm-generic/unistd.h
123+
#define SYS_sendmmsg 269
118124
#else
119125
#define SYS_sendmmsg -1
120126
#endif

0 commit comments

Comments
 (0)