From: Richard Levitte Date: Fri, 16 Dec 2016 08:24:00 +0000 (+0100) Subject: e_afalg: Don't warn about kernel version when pedantic X-Git-Tag: OpenSSL_1_1_1-pre1~2836 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=97043e46aa7083c787a1efd72ac31ca97ed41610;ds=inline e_afalg: Don't warn about kernel version when pedantic When built with --strict-warnings and the Linux kernel headers don't match the kernel version, the preprocessor warnings in engines/afalg/e_afalg.c cause compilation errors. Use the macro PEDANTIC to avoid those warnings in that case. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2095) --- diff --git a/engines/afalg/e_afalg.c b/engines/afalg/e_afalg.c index 8e019d4903..9837cae9c4 100644 --- a/engines/afalg/e_afalg.c +++ b/engines/afalg/e_afalg.c @@ -26,8 +26,10 @@ #define K_MIN2 0 #if LINUX_VERSION_CODE <= KERNEL_VERSION(K_MAJ, K_MIN1, K_MIN2) || \ !defined(AF_ALG) -# warning "AFALG ENGINE requires Kernel Headers >= 4.1.0" -# warning "Skipping Compilation of AFALG engine" +# ifndef PEDANTIC +# warning "AFALG ENGINE requires Kernel Headers >= 4.1.0" +# warning "Skipping Compilation of AFALG engine" +# endif void engine_load_afalg_int(void); void engine_load_afalg_int(void) {