Add compilation support for loongarch64 arch

This commit is contained in:
Dandan Zhang
2021-12-13 11:36:53 +08:00
parent fc876f2517
commit 8a3bf17b4b
3 changed files with 13 additions and 0 deletions

View File

@@ -105,9 +105,14 @@ static ossl_inline int io_setup(unsigned n, aio_context_t *ctx)
return syscall(__NR_io_setup, n, ctx);
}
/* Add __NR_eventfd2 syscall for loongarch64 architecture */
static ossl_inline int eventfd(int n)
{
#ifdef __loongarch64
return syscall(__NR_eventfd2, n);
#else
return syscall(__NR_eventfd, n);
#endif
}
static ossl_inline int io_destroy(aio_context_t ctx)