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.
This commit is contained in:
Daniel Pouzzner
2025-12-02 17:15:52 -06:00
parent 2b726ebf0b
commit 783e583169

View File

@@ -116,6 +116,12 @@
#endif
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)
/* added by 6bab69c650 */
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
#endif
/* kernel printf doesn't implement fp. */
#ifndef WOLFSSL_NO_FLOAT_FMT
#define WOLFSSL_NO_FLOAT_FMT
@@ -544,9 +550,16 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
#include <asm/i387.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)
/* added by a62b01cd6c */
#include <asm-generic/simd.h>
#endif
#else
#include <asm/simd.h>
#include <crypto/internal/simd.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
/* added by 266d051601 */
#include <crypto/internal/simd.h>
#endif
#endif
#ifndef CAN_SAVE_VECTOR_REGISTERS
#ifdef DEBUG_VECTOR_REGISTER_ACCESS_FUZZING