Skip to content

Commit 783e583

Browse files
committed
linuxkm/linuxkm_wc_port.h:
* add backported definition of static_assert(); * add version-gated include for asm-generic/simd.h; * add version gate for crypto/internal/simd.h.
1 parent 2b726eb commit 783e583

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

linuxkm/linuxkm_wc_port.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@
116116
#endif
117117
#endif
118118

119+
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)
120+
/* added by 6bab69c650 */
121+
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
122+
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
123+
#endif
124+
119125
/* kernel printf doesn't implement fp. */
120126
#ifndef WOLFSSL_NO_FLOAT_FMT
121127
#define WOLFSSL_NO_FLOAT_FMT
@@ -544,9 +550,16 @@
544550

545551
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
546552
#include <asm/i387.h>
553+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)
554+
/* added by a62b01cd6c */
555+
#include <asm-generic/simd.h>
556+
#endif
547557
#else
548558
#include <asm/simd.h>
549-
#include <crypto/internal/simd.h>
559+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
560+
/* added by 266d051601 */
561+
#include <crypto/internal/simd.h>
562+
#endif
550563
#endif
551564
#ifndef CAN_SAVE_VECTOR_REGISTERS
552565
#ifdef DEBUG_VECTOR_REGISTER_ACCESS_FUZZING

0 commit comments

Comments
 (0)