From: Alex Bligh Date: Wed, 18 May 2011 07:42:57 +0000 (+0100) Subject: Out of tree builds use local include file X-Git-Url: http://git.alex.org.uk Out of tree builds use local include file --- diff --git a/Makefile b/Makefile index 10f82f8..f4e3cd8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ ifneq ($(KERNELRELEASE),) # kbuild part of makefile -obj-m := nbd.o +obj-m := nbd.o +ccflags-y := -DNBD_OUTOFTREE else diff --git a/nbd.c b/nbd.c index e6fc716..0eeed20 100644 --- a/nbd.c +++ b/nbd.c @@ -37,7 +37,11 @@ #include #include +#ifdef NBD_OUTOFTREE +#include "nbd.h" +#else #include +#endif #define LO_MAGIC 0x68797548