diff --git a/src/gcc-preinclude.h b/src/gcc-preinclude.h index 9ea8c5765..d9058f82e 100644 --- a/src/gcc-preinclude.h +++ b/src/gcc-preinclude.h @@ -1,6 +1,26 @@ // http://web.archive.org/web/20140401031018/http://rjpower9000.wordpress.com:80/2012/04/09/fun-with-shared-libraries-version-glibc_2-14-not-found/ -#if defined(__linux__) && defined(__x86_64__) +#define _GNU_SOURCE +#include +#undef _GNU_SOURCE + +#if defined(__linux__) && defined(__USE_GNU) + +#if defined(__x86_64__) __asm__(".symver memcpy,memcpy@GLIBC_2.2.5"); +__asm__(".symver exp,exp@GLIBC_2.2.5"); +__asm__(".symver log,log@GLIBC_2.2.5"); +__asm__(".symver pow,pow@GLIBC_2.2.5"); +__asm__(".symver fcntl64,fcntl@GLIBC_2.2.5"); +#endif + +#if defined(__aarch64__) || defined(_M_ARM64) +__asm__(".symver memcpy,memcpy@GLIBC_2.17"); +__asm__(".symver exp,exp@GLIBC_2.17"); +__asm__(".symver log,log@GLIBC_2.17"); +__asm__(".symver pow,pow@GLIBC_2.17"); +__asm__(".symver fcntl64,fcntl@GLIBC_2.17"); +#endif + #endif