summaryrefslogtreecommitdiffhomepage
path: root/src/compat/memneq/include.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-05-08 21:44:18 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-05-17 18:07:42 +0200
commita41fa7b3add4a4505b827b3f61c60db8e6e89947 (patch)
tree5021511454c6d7fe02c40a90c49605d7fcabf768 /src/compat/memneq/include.h
parentdd5256872f6cc84f03e4ce32e3be853279987e3d (diff)
compat: use real crypto_memneq
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat/memneq/include.h')
-rw-r--r--src/compat/memneq/include.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compat/memneq/include.h b/src/compat/memneq/include.h
new file mode 100644
index 0000000..2d18acd
--- /dev/null
+++ b/src/compat/memneq/include.h
@@ -0,0 +1,5 @@
+extern noinline unsigned long __crypto_memneq(const void *a, const void *b, size_t size);
+static inline int crypto_memneq(const void *a, const void *b, size_t size)
+{
+ return __crypto_memneq(a, b, size) != 0UL ? 1 : 0;
+}