From 62d2acea5430ad78240df341bad5b3c489a8dc0d Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Tue, 16 Apr 2024 10:38:52 +0200 Subject: [PATCH] [nrf noup] utils: common: inet_ntoa is now provided by Zephyr So there's no need to provide an implementation. See 4edb9017c229c34d111ec77d3c9105f8e77448f5. Signed-off-by: Gerard Marull-Paretas --- src/utils/common.c | 10 ---------- src/utils/common.h | 4 +--- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/utils/common.c b/src/utils/common.c index 9db7ce32e..2c1275193 100644 --- a/src/utils/common.c +++ b/src/utils/common.c @@ -1302,13 +1302,3 @@ void forced_memzero(void *ptr, size_t len) if (len) forced_memzero_val = ((u8 *) ptr)[0]; } - -#ifdef CONFIG_ZEPHYR -#include -extern char *inet_ntoa(struct in_addr in) -{ - char addr[NET_IPV4_ADDR_LEN]; - - return net_addr_ntop(AF_INET, (const void *)&in, addr, NET_IPV4_ADDR_LEN); -} -#endif diff --git a/src/utils/common.h b/src/utils/common.h index 5cb80129c..40644ab60 100644 --- a/src/utils/common.h +++ b/src/utils/common.h @@ -557,9 +557,7 @@ void int_array_concat(int **res, const int *a); void int_array_sort_unique(int *a); void int_array_add_unique(int **res, int a); -#ifdef CONFIG_ZEPHYR -char *inet_ntoa(struct in_addr in); -#else +#ifndef CONFIG_ZEPHYR #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) #endif