From 1e40db9a3558d262c2a40de131ebaaec252c647b Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 22 May 2021 21:28:50 +0200 Subject: [PATCH] hitag2crack: support clang --- tools/hitag2crack/common/hitagcrypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/hitag2crack/common/hitagcrypto.c b/tools/hitag2crack/common/hitagcrypto.c index fc1a84051..fef25661f 100644 --- a/tools/hitag2crack/common/hitagcrypto.c +++ b/tools/hitag2crack/common/hitagcrypto.c @@ -208,7 +208,7 @@ // We want the crypto functions to be as fast as possible, so optimize! // The best compiler optimization in Microchip's free XC32 edition is -O1 -#ifndef __APPLE__ +#if defined(__GNUC__) && !defined(__clang__) #pragma GCC optimize("O1") #endif @@ -369,6 +369,6 @@ uint32_t hitag2_nstep(Hitag_State *pstate, uint32_t steps) { } // end of crypto core, revert to default optimization level -#ifndef __APPLE__ +#if defined(__GNUC__) && !defined(__clang__) #pragma GCC reset_options #endif