in order to build nbd against 2.6, we need this small patch: root@phear 0 root # diff -ur /usr/include/linux/nbd.h{.orig,} --- /usr/include/linux/nbd.h.orig 2004-04-04 10:49:54.295266928 -0400 +++ /usr/include/linux/nbd.h 2004-04-04 10:48:36.419105904 -0400 @@ -45,10 +45,12 @@ #ifdef PARANOIA int magic; /* FIXME: not if debugging is off */ #endif +#ifdef __KERNEL__ spinlock_t queue_lock; struct list_head queue_head;/* Requests are added here... */ struct semaphore tx_lock; struct gendisk *disk; +#endif int blksize; u64 bytesize; }; otherwise we get this: root@phear 0 nbd # make gcc -march=athlon-tbird -O2 -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Wall -W -Wno-parentheses -Wstrict-prototypes -Wno-unused -c nbd-server.c In file included from cliserv.h:39, from nbd-server.c:49: /usr/include/linux/nbd.h:48: error: syntax error before "spinlock_t" /usr/include/linux/nbd.h:54: error: syntax error before '}' token
i'm a tool, was using 2.6.0 on that machine