riscv64 aarch64 and loongarch64 use the system call numbers defined in
include/uapi/asm-generic/unistd.h in the Linux source tree.

diff -upr pyinotify-0.9.6.orig/common/inotify_syscalls.c pyinotify-0.9.6/common/inotify_syscalls.c
--- pyinotify-0.9.6.orig/common/inotify_syscalls.c	2021-07-21 11:09:23.208274056 +0200
+++ pyinotify-0.9.6/common/inotify_syscalls.c	2021-07-21 11:10:19.838321429 +0200
@@ -60,6 +60,10 @@
 #  define __NR_inotify_init		316
 #  define __NR_inotify_add_watch	317
 #  define __NR_inotify_rm_watch		318
+# elif defined (__aarch64__) || defined(__riscv) || defined(__loongarch64)
+#  define __NR_inotify_init		26
+#  define __NR_inotify_add_watch	27
+#  define __NR_inotify_rm_watch		28
 # elif defined (__sh__)
 #  define __NR_inotify_init		290
 #  define __NR_inotify_add_watch	291
