From: Paul Clements A previous "cleanup" on the nbd.h header file broke userspace compiles. I've added an #ifdef __KERNEL__ so that userspace doesn't need to worry about the nbd_device structure, which is only used in-kernel. The patch allows me to compile my nbd tools with the 2.6 nbd.h. 25-akpm/include/linux/nbd.h | 5 +++++ 1 files changed, 5 insertions(+) diff -puN include/linux/nbd.h~nbd-userspace-build-fix include/linux/nbd.h --- 25/include/linux/nbd.h~nbd-userspace-build-fix Mon Dec 15 13:49:50 2003 +++ 25-akpm/include/linux/nbd.h Mon Dec 15 13:49:50 2003 @@ -35,6 +35,9 @@ enum { /* Define PARANOIA to include extra sanity checking code in here & driver */ #define PARANOIA +/* userspace doesn't need the nbd_device structure */ +#ifdef __KERNEL__ + struct nbd_device { int flags; int harderror; /* Code of hard error */ @@ -53,6 +56,8 @@ struct nbd_device { u64 bytesize; }; +#endif + /* This now IS in some kind of include file... */ /* These are send over network in request/reply magic field */ _