diff mbox

[v3,1/1] selinux: use absolute path to include directory

Message ID 1453985956-133448-1-git-send-email-andriy.shevchenko@linux.intel.com (mailing list archive)
State Accepted
Headers show

Commit Message

Andy Shevchenko Jan. 28, 2016, 12:59 p.m. UTC
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.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 security/selinux/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul Moore Jan. 28, 2016, 4:01 p.m. UTC | #1
On Thu, Jan 28, 2016 at 7:59 AM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> 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.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  security/selinux/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

> diff --git a/security/selinux/Makefile b/security/selinux/Makefile
> index ad5cd76..3411c33 100644
> --- a/security/selinux/Makefile
> +++ b/security/selinux/Makefile
> @@ -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
>
> --
> 2.7.0.rc3
diff mbox

Patch

diff --git a/security/selinux/Makefile b/security/selinux/Makefile
index ad5cd76..3411c33 100644
--- a/security/selinux/Makefile
+++ b/security/selinux/Makefile
@@ -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