e_afalg: Don't warn about kernel version when pedantic
authorRichard Levitte <levitte@openssl.org>
Fri, 16 Dec 2016 08:24:00 +0000 (09:24 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 16 Dec 2016 13:43:49 +0000 (14:43 +0100)
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 <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2095)

engines/afalg/e_afalg.c

index 8e019d4903efd91db7ff2a7602e1ea12ebae9661..9837cae9c48ca24384afb3d7a52c60e727bd2a98 100644 (file)
 #define K_MIN2  0
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(K_MAJ, K_MIN1, K_MIN2) || \
     !defined(AF_ALG)
 #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)
 {
 void engine_load_afalg_int(void);
 void engine_load_afalg_int(void)
 {