diff --git a/sshsh256.c b/sshsh256.c index 03ff6ab1..cb138f63 100644 --- a/sshsh256.c +++ b/sshsh256.c @@ -22,7 +22,8 @@ # define HW_SHA256 HW_SHA256_NI # endif #elif defined(__GNUC__) -# if (__GNUC__ >= 5) && (defined(__x86_64__) || defined(__i386)) +# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)) && \ + (defined(__x86_64__) || defined(__i386)) # define HW_SHA256 HW_SHA256_NI # endif #elif defined (_MSC_VER) diff --git a/sshsha.c b/sshsha.c index d59f1f3d..3c09d4c5 100644 --- a/sshsha.c +++ b/sshsha.c @@ -22,7 +22,8 @@ # define HW_SHA1 HW_SHA1_NI # endif #elif defined(__GNUC__) -# if (__GNUC__ >= 5) && (defined(__x86_64__) || defined(__i386)) +# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)) && \ + (defined(__x86_64__) || defined(__i386)) # define HW_SHA1 HW_SHA1_NI # endif #elif defined (_MSC_VER)