diff --git a/Grid/qcd/action/gauge/Photon.h b/Grid/qcd/action/gauge/Photon.h index 465aa8bd..3d4baccd 100644 --- a/Grid/qcd/action/gauge/Photon.h +++ b/Grid/qcd/action/gauge/Photon.h @@ -49,7 +49,7 @@ NAMESPACE_BEGIN(Grid); typedef Lattice LinkField; typedef Lattice Field; - typedef Field ComplexField; + typedef LinkField ComplexField; }; typedef QedGImpl QedGImplR; diff --git a/Grid/util/Sha.h b/Grid/util/Sha.h index ee164c34..f3789ac4 100644 --- a/Grid/util/Sha.h +++ b/Grid/util/Sha.h @@ -27,6 +27,7 @@ /* END LEGAL */ extern "C" { #include +#include } #ifdef USE_IPP #include "ipp.h" @@ -70,10 +71,8 @@ public: static inline std::vector sha256(const void *data,size_t bytes) { std::vector hash(SHA256_DIGEST_LENGTH); - SHA256_CTX sha256; - SHA256_Init (&sha256); - SHA256_Update(&sha256, data,bytes); - SHA256_Final (&hash[0], &sha256); + auto digest = EVP_get_digestbyname("SHA256"); + EVP_Digest(data, bytes, &hash[0], NULL, digest, NULL); return hash; } static inline std::vector sha256_seeds(const std::string &s) diff --git a/tests/Test_simd.cc b/tests/Test_simd.cc index 468bc982..16205ee1 100644 --- a/tests/Test_simd.cc +++ b/tests/Test_simd.cc @@ -793,6 +793,7 @@ int main (int argc, char ** argv) } std::cout <<" OK ! "<