diff --git a/configure.ac b/configure.ac index 499f539cebb74..7ad8aa107b0b0 100644 --- a/configure.ac +++ b/configure.ac @@ -1048,7 +1048,6 @@ AC_CHECK_DECLS([getifaddrs, freeifaddrs],[CHECK_SOCKET],, [#include #include ] ) -AC_CHECK_DECLS([strnlen]) dnl These are used for daemonization in dashd AC_CHECK_DECLS([fork]) diff --git a/src/Makefile.am b/src/Makefile.am index 55ffd7a6c6905..7dfa2c60737e7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -792,7 +792,6 @@ libbitcoin_util_a_SOURCES = \ support/lockedpool.cpp \ chainparamsbase.cpp \ clientversion.cpp \ - compat/strnlen.cpp \ fs.cpp \ interfaces/echo.cpp \ interfaces/handler.cpp \ diff --git a/src/compat.h b/src/compat.h index 41f2cd7398604..e2f784b96f083 100644 --- a/src/compat.h +++ b/src/compat.h @@ -81,10 +81,6 @@ typedef int32_t ssize_t; #endif #endif -#if HAVE_DECL_STRNLEN == 0 -size_t strnlen( const char *start, size_t max_len); -#endif // HAVE_DECL_STRNLEN - #ifndef WIN32 typedef void* sockopt_arg_type; #else diff --git a/src/compat/strnlen.cpp b/src/compat/strnlen.cpp deleted file mode 100644 index 72b69953d0af5..0000000000000 --- a/src/compat/strnlen.cpp +++ /dev/null @@ -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 -#endif - -#include - -#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 \ No newline at end of file