mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
merge bitcoin#24704: remove strnlen back-compat code
This commit is contained in:
parent
b65038ec94
commit
548121d366
@ -1048,7 +1048,6 @@ AC_CHECK_DECLS([getifaddrs, freeifaddrs],[CHECK_SOCKET],,
|
|||||||
[#include <sys/types.h>
|
[#include <sys/types.h>
|
||||||
#include <ifaddrs.h>]
|
#include <ifaddrs.h>]
|
||||||
)
|
)
|
||||||
AC_CHECK_DECLS([strnlen])
|
|
||||||
|
|
||||||
dnl These are used for daemonization in dashd
|
dnl These are used for daemonization in dashd
|
||||||
AC_CHECK_DECLS([fork])
|
AC_CHECK_DECLS([fork])
|
||||||
|
@ -792,7 +792,6 @@ libbitcoin_util_a_SOURCES = \
|
|||||||
support/lockedpool.cpp \
|
support/lockedpool.cpp \
|
||||||
chainparamsbase.cpp \
|
chainparamsbase.cpp \
|
||||||
clientversion.cpp \
|
clientversion.cpp \
|
||||||
compat/strnlen.cpp \
|
|
||||||
fs.cpp \
|
fs.cpp \
|
||||||
interfaces/echo.cpp \
|
interfaces/echo.cpp \
|
||||||
interfaces/handler.cpp \
|
interfaces/handler.cpp \
|
||||||
|
@ -81,10 +81,6 @@ typedef int32_t ssize_t;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_DECL_STRNLEN == 0
|
|
||||||
size_t strnlen( const char *start, size_t max_len);
|
|
||||||
#endif // HAVE_DECL_STRNLEN
|
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
typedef void* sockopt_arg_type;
|
typedef void* sockopt_arg_type;
|
||||||
#else
|
#else
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
// Copyright (c) 2009-2014 The Bitcoin Core developers
|
|
||||||
// Distributed under the MIT software license, see the accompanying
|
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
||||||
|
|
||||||
#if defined(HAVE_CONFIG_H)
|
|
||||||
#include <config/bitcoin-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
#if HAVE_DECL_STRNLEN == 0
|
|
||||||
size_t strnlen( const char *start, size_t max_len)
|
|
||||||
{
|
|
||||||
const char *end = (const char *)memchr(start, '\0', max_len);
|
|
||||||
|
|
||||||
return end ? (size_t)(end - start) : max_len;
|
|
||||||
}
|
|
||||||
#endif // HAVE_DECL_STRNLEN
|
|
Loading…
Reference in New Issue
Block a user