aesni(4): Fix GCC build

The GCC xmmintrin.h header brokenly includes mm_malloc.h unconditionally.
(The Clang version of xmmintrin.h only includes mm_malloc.h if not compiling
in standalone mode.)

Hack around GCC's broken header by defining the include guard macro ahead of
including xmmintrin.h.

Reported by:	lwhsu, jhb
Tested by:	lwhsu
Sponsored by:	Dell EMC Isilon
This commit is contained in:
Conrad Meyer 2017-09-29 19:56:09 +00:00
parent dc8507e1f7
commit 50cf4f8950
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=324106
2 changed files with 6 additions and 4 deletions

View File

@ -59,10 +59,11 @@
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <immintrin.h>
#include <crypto/aesni/aesni_os.h>
#include <crypto/aesni/sha_sse.h>
#include <immintrin.h>
void intel_sha1_step(uint32_t *digest, const char *data, uint32_t num_blks) {
__m128i abcd, e0, e1;
__m128i abcd_save, e_save;

View File

@ -59,10 +59,11 @@
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <immintrin.h>
#include <crypto/aesni/aesni_os.h>
#include <crypto/aesni/sha_sse.h>
#include <immintrin.h>
void intel_sha256_step(uint32_t *digest, const char *data, uint32_t num_blks) {
__m128i state0, state1;
__m128i msg;