From 5058ed3ef43781de5d23c952c1fd8f8a10701c16 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 9 Sep 2015 12:14:04 -0600 Subject: [PATCH] Only build shutdown if CONFIG_NET=y. The warning is pretty annoying --- arch | 2 +- configs | 2 +- libc/net/Make.defs | 3 +++ libc/net/lib_shutdown.c | 6 +++++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/arch b/arch index 7ad0465595..152bbe9b92 160000 --- a/arch +++ b/arch @@ -1 +1 @@ -Subproject commit 7ad0465595bd053d81012283ca9cfc8d67836d17 +Subproject commit 152bbe9b9285d4f6141f3e8839ba0fc1d0d96be2 diff --git a/configs b/configs index 3eab5db173..08498337c3 160000 --- a/configs +++ b/configs @@ -1 +1 @@ -Subproject commit 3eab5db1733b5dcd55505925b0a989d8f2085aa3 +Subproject commit 08498337c384cea7c918676495a9b3e6907cb092 diff --git a/libc/net/Make.defs b/libc/net/Make.defs index 26f39738a5..0d2a7fb4d4 100644 --- a/libc/net/Make.defs +++ b/libc/net/Make.defs @@ -37,7 +37,10 @@ CSRCS += lib_addrconfig.c lib_etherntoa.c lib_htons.c lib_htonl.c CSRCS += lib_inetaddr.c lib_inetntoa.c lib_inetntop.c lib_inetpton.c + +ifeq ($(CONFIG_NET),y) CSRCS += lib_shutdown.c +endif # Routing table support diff --git a/libc/net/lib_shutdown.c b/libc/net/lib_shutdown.c index a1ef4316ac..b533dbd2cf 100644 --- a/libc/net/lib_shutdown.c +++ b/libc/net/lib_shutdown.c @@ -39,12 +39,14 @@ #include +#ifdef CONFIG_NET + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** - * Public FUnctions + * Public Functions ****************************************************************************/ /**************************************************************************** @@ -84,3 +86,5 @@ int shutdown(int sockfd, int how) #warning Missing Logic return OK; } + +#endif /* CONFIG_NET */