From: Johannes Berg Date: Wed, 11 Oct 2017 14:30:27 +0000 (+0200) Subject: backports: add crypto_memneq() X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=9e3a5ca03d4baac4c99ff8a60d134a61c6540e29;p=openwrt%2Fstaging%2Fblogic.git backports: add crypto_memneq() Signed-off-by: Johannes Berg --- diff --git a/backport/backport-include/crypto/algapi.h b/backport/backport-include/crypto/algapi.h new file mode 100644 index 000000000000..b6fbdd9bf224 --- /dev/null +++ b/backport/backport-include/crypto/algapi.h @@ -0,0 +1,16 @@ +#ifndef __BP_ALGAPI_H +#define __BP_ALGAPI_H +#include +#include_next + +#if LINUX_VERSION_IS_LESS(3,13,0) +#define __crypto_memneq LINUX_BACKPORT(__crypto_memneq) +noinline unsigned long __crypto_memneq(const void *a, const void *b, size_t size); +#define crypto_memneq LINUX_BACKPORT(crypto_memneq) +static inline int crypto_memneq(const void *a, const void *b, size_t size) +{ + return __crypto_memneq(a, b, size) != 0UL ? 1 : 0; +} +#endif + +#endif /* __BP_ALGAPI_H */ diff --git a/backport/compat/Makefile b/backport/compat/Makefile index 1078357fd04b..1658f588c68f 100644 --- a/backport/compat/Makefile +++ b/backport/compat/Makefile @@ -20,7 +20,7 @@ compat-$(CPTCFG_KERNEL_3_9) += compat-3.9.o compat-$(CPTCFG_KERNEL_3_10) += backport-3.10.o compat-$(CPTCFG_KERNEL_3_11) += backport-3.11.o compat-$(CPTCFG_KERNEL_3_12) += backport-3.12.o -compat-$(CPTCFG_KERNEL_3_13) += backport-3.13.o +compat-$(CPTCFG_KERNEL_3_13) += backport-3.13.o memneq.o compat-$(CPTCFG_KERNEL_3_14) += backport-3.14.o compat-$(CPTCFG_KERNEL_3_15) += backport-3.15.o compat-$(CPTCFG_KERNEL_3_17) += backport-3.17.o diff --git a/copy-list b/copy-list index 88e91c617125..678ebe2f59fc 100644 --- a/copy-list +++ b/copy-list @@ -20,6 +20,9 @@ include/linux/fixp-arith.h include/linux/bitfield.h include/linux/average.h +# crypto_memneq +crypto/memneq.c -> compat/memneq.c + # 802.11 drivers/net/wireless/Kconfig drivers/net/wireless/Makefile