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.
This commit is contained in:
18
ext/misc/linux-old-glibc-compat.c
Normal file
18
ext/misc/linux-old-glibc-compat.c
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user