This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 23b8b39  sched/group/group_setuptaskfiles.c:  Fix bad file inclusion.
23b8b39 is described below

commit 23b8b397999136c61b3c834956ad1da55fb0e072
Author: Gregory Nutt <[email protected]>
AuthorDate: Wed Mar 4 17:09:23 2020 -0600

    sched/group/group_setuptaskfiles.c:  Fix bad file inclusion.
    
    Also remove the horrible violation of the architectural rules by adding an 
include path into net in sched/group/Make.defs.  Folks, if you are going to 
participate in this project, you MUST respect the odule architecture and never, 
never, never do these things.
    
    commit d07afc934e272cbbd63e355d9e12db333b2e2978, "fcntl: add 
O_CLOEXEC/FD_CLOEXEC support" introduce a compilation error .. a bad file 
inclusion.  That commit added an unnecessary inclusion of "socket/socket.h" 
which is NOT available in the sched sub-directory. It is only available under 
the net/ sub-directory.
    
    There is no include path for such and inclusion and there must NEVER be 
such a include path.  Module design forbids including header files between 
diffent "silos" in the design.  Nothing under net/ can ever be available to 
logic under sched/.
---
 sched/group/Make.defs              | 2 --
 sched/group/group_setuptaskfiles.c | 1 -
 2 files changed, 3 deletions(-)

diff --git a/sched/group/Make.defs b/sched/group/Make.defs
index d59fce3..a803947 100644
--- a/sched/group/Make.defs
+++ b/sched/group/Make.defs
@@ -76,5 +76,3 @@ endif
 
 DEPPATH += --dep-path group
 VPATH += :group
-
-CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)net}
diff --git a/sched/group/group_setuptaskfiles.c 
b/sched/group/group_setuptaskfiles.c
index 21532e5..b481e46 100644
--- a/sched/group/group_setuptaskfiles.c
+++ b/sched/group/group_setuptaskfiles.c
@@ -47,7 +47,6 @@
 #include <nuttx/net/net.h>
 
 #include "sched/sched.h"
-#include "socket/socket.h"
 #include "group/group.h"
 
 /****************************************************************************

Reply via email to