mirror of
https://github.com/espressif/openthread.git
synced 2026-08-08 11:47:46 +00:00
Add include openthread-config.h to missing_str*.c files (#1677)
* Add include openthread-config.h to missing_str*.c files * Enable _BSD_SOURCE and _DEFAULT_SOURCE
This commit is contained in:
committed by
Jonathan Hui
parent
3a09b79b2e
commit
41c1dbf9ef
@@ -539,6 +539,7 @@ AM_CONDITIONAL([OPENTHREAD_ENABLE_BUILTIN_MBEDTLS], [test "${enable_builtin_mbed
|
||||
# Thread Border Agent Proxy
|
||||
#
|
||||
|
||||
AC_MSG_CHECKING([whether to enable border router proxy])
|
||||
AC_ARG_ENABLE(border_agent_proxy,
|
||||
[AS_HELP_STRING([--enable-border-agent-proxy],[Enable border agent proxy support @<:@default=no@:>@.])],
|
||||
[
|
||||
@@ -1132,6 +1133,20 @@ AC_MSG_NOTICE([checking required package dependencies])
|
||||
# Check for headers
|
||||
#
|
||||
|
||||
#---------------------------------------------------
|
||||
# Enable BSD Security Features
|
||||
# This enables strlcpy() and other friends in GNU land.
|
||||
# While the references below generally speak of: "glibc"
|
||||
# The ARM Embedded platform uses the nano instance of NEWLIB
|
||||
# Which greatly follows and mirrors glibc.
|
||||
# --------------------------------------------------
|
||||
#
|
||||
# References:
|
||||
# 1) http://stackoverflow.com/questions/29201515/what-does-d-default-source-do
|
||||
# 2) http://man7.org/linux/man-pages/man7/feature_test_macros.7.html
|
||||
#
|
||||
CFLAGS="${CFLAGS} -D_BSD_SOURCE=1 -D_DEFAULT_SOURCE=1"
|
||||
CXXFLAGS="${CXXFLAGS} -D_BSD_SOURCE=1 -D_DEFAULT_SOURCE=1"
|
||||
|
||||
OLD_CFLAGS="${CFLAGS}"
|
||||
CFLAGS="${CFLAGS} -Wno-error=address"
|
||||
|
||||
@@ -25,6 +25,12 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef OPENTHREAD_CONFIG_FILE
|
||||
#include OPENTHREAD_CONFIG_FILE
|
||||
#else
|
||||
#include <openthread-config.h>
|
||||
#endif
|
||||
|
||||
#include "utils/wrap_string.h"
|
||||
|
||||
size_t missing_strlcat(char *dest, const char *src, size_t size)
|
||||
|
||||
@@ -25,6 +25,12 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef OPENTHREAD_CONFIG_FILE
|
||||
#include OPENTHREAD_CONFIG_FILE
|
||||
#else
|
||||
#include <openthread-config.h>
|
||||
#endif
|
||||
|
||||
#include "utils/wrap_string.h"
|
||||
|
||||
size_t missing_strlcpy(char *dest, const char *src, size_t size)
|
||||
|
||||
@@ -25,6 +25,12 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef OPENTHREAD_CONFIG_FILE
|
||||
#include OPENTHREAD_CONFIG_FILE
|
||||
#else
|
||||
#include <openthread-config.h>
|
||||
#endif
|
||||
|
||||
#include "utils/wrap_string.h"
|
||||
|
||||
size_t missing_strnlen(const char *s, size_t maxlen)
|
||||
|
||||
Reference in New Issue
Block a user