mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-14 09:08:11 +00:00
ffc6b678b9
glibc/libstdc++ have added new symbols in later releases. When running a new binary against an older glibc, the run-time linker is unable to resolve the new symbols and the binary refuses to run. This can be fixed by adding our own versions of those functions, so that the build-time linker does not emit undefined symbols for them. This enables our binary releases to work on older Linux distros, while not incurring the downsides of a fully static binary.
20 lines
553 B
C++
20 lines
553 B
C++
#include "bitcoin-config.h"
|
|
#include <cstddef>
|
|
#include <sys/select.h>
|
|
|
|
// Prior to GLIBC_2.14, memcpy was aliased to memmove.
|
|
extern "C" void* memmove(void* a, const void* b, size_t c);
|
|
extern "C" void* memcpy(void* a, const void* b, size_t c)
|
|
{
|
|
return memmove(a, b, c);
|
|
}
|
|
|
|
extern "C" void __chk_fail (void) __attribute__((__noreturn__));
|
|
extern "C" FDELT_TYPE __fdelt_warn(FDELT_TYPE a)
|
|
{
|
|
if (a >= FD_SETSIZE)
|
|
__chk_fail ();
|
|
return a / __NFDBITS;
|
|
}
|
|
extern "C" FDELT_TYPE __fdelt_chk(FDELT_TYPE) __attribute__((weak, alias("__fdelt_warn")));
|