Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Sep 2017 19:56:09 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r324106 - head/sys/crypto/aesni
Message-ID:  <201709291956.v8TJu92e023952@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Fri Sep 29 19:56:09 2017
New Revision: 324106
URL: https://svnweb.freebsd.org/changeset/base/324106

Log:
  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

Modified:
  head/sys/crypto/aesni/intel_sha1.c
  head/sys/crypto/aesni/intel_sha256.c

Modified: head/sys/crypto/aesni/intel_sha1.c
==============================================================================
--- head/sys/crypto/aesni/intel_sha1.c	Fri Sep 29 17:09:13 2017	(r324105)
+++ head/sys/crypto/aesni/intel_sha1.c	Fri Sep 29 19:56:09 2017	(r324106)
@@ -59,9 +59,10 @@
 __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;

Modified: head/sys/crypto/aesni/intel_sha256.c
==============================================================================
--- head/sys/crypto/aesni/intel_sha256.c	Fri Sep 29 17:09:13 2017	(r324105)
+++ head/sys/crypto/aesni/intel_sha256.c	Fri Sep 29 19:56:09 2017	(r324106)
@@ -59,9 +59,10 @@
 __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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709291956.v8TJu92e023952>