afalg: Fix kernel version check
The check should reject kernel versions < 4.1.0, not <= 4.1.0.
The issue was spotted on OpenSUSE 42.1 Leap, since its linux/version.h
header advertises 4.1.0.
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/4618)
Baptiste Jonglez authored 6 years ago
Richard Levitte committed 6 years ago
23 | 23 |
#define K_MAJ 4
|
24 | 24 |
#define K_MIN1 1
|
25 | 25 |
#define K_MIN2 0
|
26 | |
#if LINUX_VERSION_CODE <= KERNEL_VERSION(K_MAJ, K_MIN1, K_MIN2) || \
|
|
26 |
#if LINUX_VERSION_CODE < KERNEL_VERSION(K_MAJ, K_MIN1, K_MIN2) || \
|
27 | 27 |
!defined(AF_ALG)
|
28 | 28 |
# ifndef PEDANTIC
|
29 | 29 |
# warning "AFALG ENGINE requires Kernel Headers >= 4.1.0"
|
14 | 14 |
# define K_MAJ 4
|
15 | 15 |
# define K_MIN1 1
|
16 | 16 |
# define K_MIN2 0
|
17 | |
# if LINUX_VERSION_CODE <= KERNEL_VERSION(K_MAJ, K_MIN1, K_MIN2)
|
|
17 |
# if LINUX_VERSION_CODE < KERNEL_VERSION(K_MAJ, K_MIN1, K_MIN2)
|
18 | 18 |
/*
|
19 | 19 |
* If we get here then it looks like there is a mismatch between the linux
|
20 | 20 |
* headers and the actual kernel version, so we have tried to compile with
|