From ef796b2d9ea61ad418bb42615b842308d6dfc23f Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 14 Jul 2017 14:41:46 -0600 Subject: [PATCH] Socket I/F: Misc clean-up to get a clean USRSOCK build. --- include/nuttx/net/net.h | 1 + net/socket/Make.defs | 1 + net/socket/accept.c | 3 --- net/socket/inet_sockif.c | 2 +- net/socket/net_clone.c | 7 +------ net/socket/send.c | 5 ----- net/socket/sendto.c | 5 +---- net/socket/socket.h | 3 +-- 8 files changed, 6 insertions(+), 21 deletions(-) diff --git a/include/nuttx/net/net.h b/include/nuttx/net/net.h index a07afd4e5a1..36f90d1a565 100644 --- a/include/nuttx/net/net.h +++ b/include/nuttx/net/net.h @@ -108,6 +108,7 @@ typedef uint8_t sockcaps_t; */ struct socket; /* Forward reference */ +struct pollfd; /* Forward reference */ struct sock_intf_s { diff --git a/net/socket/Make.defs b/net/socket/Make.defs index e3834ca93a9..0ce04f106d3 100644 --- a/net/socket/Make.defs +++ b/net/socket/Make.defs @@ -69,6 +69,7 @@ endif ifeq ($(CONFIG_NET_TCP),y) SOCK_CSRCS += listen.c accept.c + ifneq ($(CONFIG_NET_TCP_NO_STACK),y) SOCK_CSRCS += net_monitor.c endif diff --git a/net/socket/accept.c b/net/socket/accept.c index 48b76d15e04..f69fabf698f 100644 --- a/net/socket/accept.c +++ b/net/socket/accept.c @@ -49,10 +49,7 @@ #include #include -#include "tcp/tcp.h" -#include "local/local.h" #include "socket/socket.h" -#include "usrsock/usrsock.h" #if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0 diff --git a/net/socket/inet_sockif.c b/net/socket/inet_sockif.c index 7ef6c507224..b26167f0eba 100644 --- a/net/socket/inet_sockif.c +++ b/net/socket/inet_sockif.c @@ -269,7 +269,7 @@ static int usrsock_socket_setup(int domain, int type, int protocol, static int inet_setup(FAR struct socket *psock, int protocol) { #ifdef CONFIG_NET_USRSOCK - /* Handle speical setup for user INET sockets */ + /* Handle special setup for user INET sockets */ ret = usrsock_socket_setup(domain, type, protocol, psock); if (ret < 0) diff --git a/net/socket/net_clone.c b/net/socket/net_clone.c index 7ab3852574d..81394115294 100644 --- a/net/socket/net_clone.c +++ b/net/socket/net_clone.c @@ -1,7 +1,7 @@ /**************************************************************************** * net/socket/net_clone.c * - * Copyright (C) 2009, 2011-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011-2015, 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -48,12 +48,7 @@ #include #include -#include "tcp/tcp.h" -#include "udp/udp.h" -#include "pkt/pkt.h" -#include "local/local.h" #include "socket/socket.h" -#include "usrsock/usrsock.h" /**************************************************************************** * Public Functions diff --git a/net/socket/send.c b/net/socket/send.c index 9af7e88cdb7..4556f128d16 100644 --- a/net/socket/send.c +++ b/net/socket/send.c @@ -47,11 +47,6 @@ #include -#include "pkt/pkt.h" -#include "tcp/tcp.h" -#include "udp/udp.h" -#include "sixlowpan/sixlowpan.h" -#include "local/local.h" #include "socket/socket.h" /**************************************************************************** diff --git a/net/socket/sendto.c b/net/socket/sendto.c index acac383cd70..341a7ecdc27 100644 --- a/net/socket/sendto.c +++ b/net/socket/sendto.c @@ -1,7 +1,7 @@ /**************************************************************************** * net/socket/sendto.c * - * Copyright (C) 2007-2009, 2011-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011-2015, 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -49,9 +49,6 @@ #include #include -#include "udp/udp.h" -#include "sixlowpan/sixlowpan.h" -#include "local/local.h" #include "socket/socket.h" /**************************************************************************** diff --git a/net/socket/socket.h b/net/socket/socket.h index 6a904f95f59..f3dd2bf7ab3 100644 --- a/net/socket/socket.h +++ b/net/socket/socket.h @@ -49,7 +49,6 @@ #include #include -#include "tcp/tcp.h" /**************************************************************************** * Pre-processor Definitions @@ -176,7 +175,7 @@ struct tcp_conn_s; /* Forward reference */ * ****************************************************************************/ -int sockfd_allocate(int minsd); +int sockfd_allocate(int minsd); /**************************************************************************** * Name: sock_release