[Ocfs2-test-devel] [PATCH] libocfs2test/file_ops.c: only compile when OCFS2_TEST_REFLINK is defined

tristan.ye tristan.ye at oracle.com
Mon Apr 13 03:07:19 PDT 2009


I have no objection to taking this as a temporary solution.

Signed-off-by: Tristan Ye <tristan.ye at oracle.com>

On Mon, 2009-04-13 at 17:33 +0800, Coly Li wrote:
> reflink feature is not upstream yet, which means compiling
> libocfs2test/file_ops.c will fail on:
> 
> file_ops.c:282: error: ‘OCFS2_IOC_REFLINK’ undeclared (first use in this function)
> 
> This patch makes libocfs2test/file_ops.c get compiled only when
> OCFS2_TEST_REFLINK is defined. It can make the compiling pass before reflink
> feature gets merged into upstream.
> 
> Signed-off-by: Coly Li <coly.li at suse.de>
> Cc: Tristan Ye <tristan.ye at oracle.com>
> ---
>  programs/libocfs2test/Makefile |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/programs/libocfs2test/Makefile b/programs/libocfs2test/Makefile
> index 7d056e7..1ec2077 100644
> --- a/programs/libocfs2test/Makefile
> +++ b/programs/libocfs2test/Makefile
> @@ -7,15 +7,21 @@ LIBRARIES = libocfs2test.a
>  CFLAGS += -fPIC
> 
>  CFILES =		\
> -	file_ops.c	\
>  	dir_ops.c	\
>  	xattr_ops.c
> 
> +ifdef OCFS2_TEST_REFLINK
> +CFILES +=	file_ops.c
> +endif
> +
>  HFILES =		\
> -	file_ops.h	\
>  	dir_ops.h	\
>  	xattr_ops.h
> 
> +ifdef OCFS2_TEST_REFLINK
> +HFILES +=	file_ops.h
> +endif
> +
>  mpi_ops.o: mpi_ops.c mpi_ops.h
>  	$(MPICC) -c -o mpi_ops.o mpi_ops.c $(CFLAGS)
> 




More information about the Ocfs2-test-devel mailing list