From 5ca3f0ba0042001da71500307d38abb64a52dbec Mon Sep 17 00:00:00 2001 From: SlugFiller <5435495+SlugFiller@users.noreply.github.com> Date: Mon, 22 May 2023 06:31:45 +0300 Subject: [PATCH 1/2] Support compilation using CLang on Windows The Microsoft-only equivalent to GCC's `cpuid.h` is `intrin.h`. CLang contains both, but neither is directly included in Win32 builds, causing `__cpuid` to not be defined. This explicitly includes `intrin.h` when `cpuid.h` is not used. Signed-off-by: SlugFiller <5435495+SlugFiller@users.noreply.github.com> --- library/aesni.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/aesni.c b/library/aesni.c index a23c5b595..78dd8b094 100644 --- a/library/aesni.c +++ b/library/aesni.c @@ -35,6 +35,8 @@ #if MBEDTLS_AESNI_HAVE_CODE == 2 #if !defined(_WIN32) #include +#else +#include #endif #include #endif From daa363b4d358dbf4141999f689c7165c421028d4 Mon Sep 17 00:00:00 2001 From: SlugFiller <5435495+SlugFiller@users.noreply.github.com> Date: Wed, 14 Jun 2023 05:42:12 +0300 Subject: [PATCH 2/2] Add changelog entry Signed-off-by: SlugFiller <5435495+SlugFiller@users.noreply.github.com> --- ChangeLog.d/fix-win32-llvm-build.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 ChangeLog.d/fix-win32-llvm-build.txt diff --git a/ChangeLog.d/fix-win32-llvm-build.txt b/ChangeLog.d/fix-win32-llvm-build.txt new file mode 100644 index 000000000..826551ccf --- /dev/null +++ b/ChangeLog.d/fix-win32-llvm-build.txt @@ -0,0 +1,2 @@ +Bugfix + * Fix builds on Windows with clang