diff --git a/include/secp256k1.h b/include/secp256k1.h index b0a03043bf..ddb0f14750 100644 --- a/include/secp256k1.h +++ b/include/secp256k1.h @@ -162,15 +162,12 @@ typedef int (*secp256k1_nonce_function)( /* Consuming libsecp256k1 as a DLL. */ # define SECP256K1_API extern __declspec (dllimport) # endif -#endif -#ifndef SECP256K1_API -# if defined(__GNUC__) && (__GNUC__ >= 4) && defined(SECP256K1_BUILD) - /* Building libsecp256k1 on non-Windows using GCC or compatible. */ -# define SECP256K1_API extern __attribute__ ((visibility ("default"))) -# else - /* All cases not captured above. */ -# define SECP256K1_API extern -# endif +#elif defined(__GNUC__) && (__GNUC__ >= 4) && defined(SECP256K1_BUILD) + /* Building libsecp256k1 on non-Windows using GCC or compatible. */ +# define SECP256K1_API extern __attribute__ ((visibility ("default"))) +#else + /* All cases not captured above. */ +# define SECP256K1_API extern #endif /* Warning attributes