Remove duplicate destination decoding
[bitcoinplatinum.git] / src / compat / glibc_compat.cpp
blob3b9c70df7fe81e1cc83c7e92bfefae716a933fd7
1 // Copyright (c) 2009-2014 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 #if defined(HAVE_CONFIG_H)
6 #include "config/bitcoin-config.h"
7 #endif
9 #include <cstddef>
11 #if defined(HAVE_SYS_SELECT_H)
12 #include <sys/select.h>
13 #endif
15 // Prior to GLIBC_2.14, memcpy was aliased to memmove.
16 extern "C" void* memmove(void* a, const void* b, size_t c);
17 extern "C" void* memcpy(void* a, const void* b, size_t c)
19 return memmove(a, b, c);
22 extern "C" void __chk_fail(void) __attribute__((__noreturn__));
23 extern "C" FDELT_TYPE __fdelt_warn(FDELT_TYPE a)
25 if (a >= FD_SETSIZE)
26 __chk_fail();
27 return a / __NFDBITS;
29 extern "C" FDELT_TYPE __fdelt_chk(FDELT_TYPE) __attribute__((weak, alias("__fdelt_warn")));