Skip to contentSkip to conversation

selinux: use absolute path to include directory

PATCH Superseded Andy Shevchenko 2 participants 2 messages Jan 19, 2016 SELinux security module

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 selinux: use absolute path to include directory

Compiler warns us a lot that it can't find include folder because it's provided in relative form.

CC security/selinux/netlabel.o
cc1: warning: security/selinux/include: No such file or directory [-Wmissing-include-dirs]
cc1: warning: security/selinux/include: No such file or directory [-Wmissing-include-dirs]
cc1: warning: security/selinux/include: No such file or directory [-Wmissing-include-dirs]
cc1: warning: security/selinux/include: No such file or directory [-Wmissing-include-dirs]

Add $(srctree) prefix to the path.

---
v2:
- apply change for all -I occurences

 security/selinux/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/selinux/Makefile +1 -1
index ad5cd76..b850811 100644
@@ -13,7 +13,7 @@ selinux-$(CONFIG_SECURITY_NETWORK_XFRM) += xfrm.o
 
 selinux-$(CONFIG_NETLABEL) += netlabel.o
 
-ccflags-y := -Isecurity/selinux -Isecurity/selinux/include
+ccflags-y := -I$(srctree)security/selinux -I$(srctree)/security/selinux/include
 
 $(addprefix $(obj)/,$(selinux-y)): $(obj)/flask.h
 
Signature · 1 line
2.7.0.rc3
maintainer
#1 lore raw

security/selinux/Makefile selinux-$(CONFIG_SECURITY_NETWORK_XFRM) += xfrm.o · line 16

Quoted 10 lines · Andy Shevchenko
security/selinux/Makefile +1 -1
index ad5cd76..b850811 100644
@@ -13,7 +13,7 @@ selinux-$(CONFIG_SECURITY_NETWORK_XFRM) += xfrm.o
 
 selinux-$(CONFIG_NETLABEL) += netlabel.o
 
-ccflags-y := -Isecurity/selinux -Isecurity/selinux/include
+ccflags-y := -I$(srctree)security/selinux I$(srctree)/security/...

You are missing a "/" after "$(srctree)".

Please make sure that your patches compile and pass basic functionality before submitting; I don't care how trivial they may be, we all make the occasional mistake, and a basic compile/boot test does wonders for catching a lot of these stupid mistakes.

Quoted 1 line
security/selinux/Makefile +0 -0
 $(addprefix $(obj)/,$(selinux-y)): $(obj)/flask.h
Signature · 2 lines
paul moore
www.paul-moore.com