Use ISO C compliant inline assembly with supported compilers.

When compiled with enforced ISO C (e.g. -std=c11) 'asm' inline
does not compile (it's GNU extension). Use __asm__ inline assembly
with GCC and clang compliers instead.

Fixes: #786.
This commit is contained in:
Ondrej Kozina
2023-01-17 13:09:41 +01:00
committed by Milan Broz
parent 482c819ea2
commit 5216002773

View File

@@ -72,9 +72,9 @@
__attribute__((__symver__(#_public_sym _ver_str #_maj "." #_min)))
#endif
#if !defined(_CRYPT_SYMVER) && defined(__GNUC__)
#if !defined(_CRYPT_SYMVER) && (defined(__GNUC__) || defined(__clang__))
# define _CRYPT_SYMVER(_local_sym, _public_sym, _ver_str, _maj, _min) \
asm(".symver " #_local_sym "," #_public_sym _ver_str #_maj "." #_min);
__asm__(".symver " #_local_sym "," #_public_sym _ver_str #_maj "." #_min);
#endif
#define _CRYPT_FUNC(_public_sym, _prefix_str, _maj, _min, _ret, ...) \