[CRIU] [PATCH 1/3] make: Use -iquote for headers lookup

Andrew Vagin avagin at parallels.com
Tue Feb 19 02:14:56 EST 2013


On Tue, Feb 19, 2013 at 01:53:25AM +0400, Cyrill Gorcunov wrote:
> 
> Some of ours headers (such as syscall.h) are
> clashes with system headers names. So we need
> to be sure that the headers we include as
> 
>  | #include "something.h"

Could we forbid to include such files from global directories?

> 
> being searched in known place. In particular on
> some machines it it already produced problems.
> 
> This btw revealved a problem in cr-dump.c -- we've
> had #include <parasite.h> there. Fix it.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  Makefile  | 2 +-
>  cr-dump.c | 1 -
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 

> diff --git a/Makefile b/Makefile
> index 0faea61..105a72d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -68,7 +68,7 @@ ARCH_DIR	:= arch/$(ARCH)
>  
>  $(if $(wildcard $(ARCH_DIR)),,$(error "The architecture $(ARCH) isn't supported"))
>  
> -CFLAGS		+= -Iinclude -Ipie -I. -I$(ARCH_DIR)
> +CFLAGS		+= -iquote include -iquote pie -iquote . -iquote $(ARCH_DIR)
>  CFLAGS		+= -iquote $(ARCH_DIR)/include -fno-strict-aliasing
>  
>  LIBS		:= -lrt -lpthread -lprotobuf-c
> diff --git a/cr-dump.c b/cr-dump.c
> index f76ca32..4c3d064 100644
> --- a/cr-dump.c
> +++ b/cr-dump.c
> @@ -7,7 +7,6 @@
>  #include <unistd.h>
>  #include <errno.h>
>  #include <string.h>
> -#include <parasite.h>
>  
>  #include <fcntl.h>
>  



More information about the CRIU mailing list