diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2018-02-01 15:52:41 -0800 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2018-02-01 15:52:41 -0800 |
commit | 26aaf253acf115e67ab969f95e002ce1074df13e (patch) | |
tree | 6158943185d81ef0c68d4bf9f159983a08f97371 /ext/misc | |
parent | 51715376bf6cb5c8251ea77e799dcf194bf8efcd (diff) | |
download | infinitytier-26aaf253acf115e67ab969f95e002ce1074df13e.tar.gz infinitytier-26aaf253acf115e67ab969f95e002ce1074df13e.zip |
Allow us to build a semi-dynamic official binary that works back to CentOS 6, at least on x64, and is very fast since we can build it with newer clang or icc.
Diffstat (limited to 'ext/misc')
-rw-r--r-- | ext/misc/linux-old-glibc-compat.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/misc/linux-old-glibc-compat.c b/ext/misc/linux-old-glibc-compat.c new file mode 100644 index 00000000..6d793a2d --- /dev/null +++ b/ext/misc/linux-old-glibc-compat.c @@ -0,0 +1,18 @@ +#include <stdint.h> +#include <stdlib.h> +#include <string.h> + +__asm__(".symver memcpy,memcpy@GLIBC_2.2.5"); + +#ifdef __cplusplus +extern "C" { +#endif + +extern void *__wrap_memcpy(void *dest,const void *src,size_t n) +{ + return memcpy(dest,src,n); +} + +#ifdef __cplusplus +} +#endif |