add a memcpy wrapper for use when packaging the linux version so it can run on older distros

This commit is contained in:
insofaras 2016-02-24 19:10:42 +00:00
parent 248125dbaa
commit 353dcce12b
1 changed files with 12 additions and 0 deletions

12
linux_release_compat.c Normal file
View File

@ -0,0 +1,12 @@
#include <string.h>
// Link to the memcpy symbol with version 2.2.5 instead of the newer 2.14 one
// since they are functionaly equivalent, but using the old one allows 4coder
// to run on older distros without glibc >= 2.14
extern "C" {
asm (".symver memcpy, memcpy@GLIBC_2.2.5");
void *__wrap_memcpy(void *dest, const void *src, size_t n){
return memcpy(dest, src, n);
}
}