From e1b0821eb14d4f801422f901285307fc09d24eb9 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 21 Aug 2017 07:14:33 -0600 Subject: [PATCH] If only PF_IEEE802154 socket family is enabled, then must use SOCK_DGRAM. --- include/netutils/netlib.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/netutils/netlib.h b/include/netutils/netlib.h index 652c3bf97..558b9c4c5 100644 --- a/include/netutils/netlib.h +++ b/include/netutils/netlib.h @@ -65,10 +65,14 @@ * if UDP is disabled. */ -#ifdef CONFIG_NET_UDP +#if defined(CONFIG_NET_UDP) # define NETLIB_SOCK_IOCTL SOCK_DGRAM -#else +#elif defined(CONFIG_NET_TCP) # define NETLIB_SOCK_IOCTL SOCK_STREAM +#elif defined(CONFIG_NET_IEEE802154) +# define NETLIB_SOCK_IOCTL SOCK_DGRAM +#elif defined(CONFIG_NET_PKT) +# define NETLIB_SOCK_IOCTL SOCK_RAW #endif /****************************************************************************