summaryrefslogtreecommitdiffstats
path: root/engines/e_afalg.c
diff options
context:
space:
mode:
authorBaptiste Jonglez <git@bitsofnetworks.org>2017-10-30 11:36:06 +0100
committerRichard Levitte <levitte@openssl.org>2017-10-31 11:19:47 +0100
commitbee9c8a4ffd3ec65bb56aaa04423c4f6f9c4012c (patch)
tree4aa2964cc68dd30dcdd55d1dcb4294363e3e7cd3 /engines/e_afalg.c
parentf19a5ff9ab85313f5b30cfc9fbed3a2eea60a59d (diff)
afalg: Use eventfd2 syscall instead of eventfd
The eventfd syscall is deprecated and is not available on aarch64, causing build to fail: engines/e_afalg.c: In function 'eventfd': engines/e_afalg.c:108:20: error: '__NR_eventfd' undeclared (first use in this function) return syscall(__NR_eventfd, n); ^ Instead, switch to the newer eventfd2 syscall, which is supposed to be supported by all architectures. This kind of issues would be avoided by simply using the eventfd(2) wrapper from the libc, but there must be subtle reasons not to... Tested on a aarch64 system running OpenSUSE Leap 42.1 (gcc118 from https://cfarm.tetaneutral.net/machines/list/ ) and also cross-compiling for aarch64 with LEDE (kernel 4.9). This properly fixes #1685. CLA: trivial Fixes: 7f458a48 ("ALG: Add AFALG engine") Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4617)
Diffstat (limited to 'engines/e_afalg.c')
-rw-r--r--engines/e_afalg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/e_afalg.c b/engines/e_afalg.c
index 7e682554ed..e6fa5472d3 100644
--- a/engines/e_afalg.c
+++ b/engines/e_afalg.c
@@ -105,7 +105,7 @@ static ossl_inline int io_setup(unsigned n, aio_context_t *ctx)
static ossl_inline int eventfd(int n)
{
- return syscall(__NR_eventfd, n);
+ return syscall(__NR_eventfd2, n, 0);
}
static ossl_inline int io_destroy(aio_context_t ctx)