Skip to content
Permalink
Browse files

net: relax net_ip.h check

This allows network stack headers to be included even if
no L3 networking support is enabled in Kconfig.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
  • Loading branch information...
andrewboie authored and jukkar committed Jul 23, 2018
1 parent efb0080 commit 8e8dc1c528bd63fceb602bba22424239c6979cdb
Showing with 1 addition and 8 deletions.
  1. +1 −8 include/net/net_ip.h
@@ -133,20 +133,13 @@ struct sockaddr_in_ptr {
struct in_addr *sin_addr; /* IPv4 address */
};

#if defined(CONFIG_NET_IPV6)
#define NET_SOCKADDR_MAX_SIZE (sizeof(struct sockaddr_in6))
#define NET_SOCKADDR_PTR_MAX_SIZE (sizeof(struct sockaddr_in6_ptr))
#elif defined(CONFIG_NET_IPV4)
#if defined(CONFIG_NET_IPV4) && !defined(CONFIG_NET_IPV6)
#define NET_SOCKADDR_MAX_SIZE (sizeof(struct sockaddr_in))
#define NET_SOCKADDR_PTR_MAX_SIZE (sizeof(struct sockaddr_in_ptr))
#else
#if !defined(CONFIG_NET_RAW_MODE)
#error "Either IPv6 or IPv4 needs to be selected."
#else
#define NET_SOCKADDR_MAX_SIZE (sizeof(struct sockaddr_in6))
#define NET_SOCKADDR_PTR_MAX_SIZE (sizeof(struct sockaddr_in6_ptr))
#endif
#endif

struct sockaddr {
sa_family_t sa_family;

0 comments on commit 8e8dc1c

Please sign in to comment.
You can’t perform that action at this time.