[Nbd] Re: Problems getting nbd-2.7.x to compile
Hi, just had some problems compiling nbd and found the appropriate
thread on this list:
: On Fri, Jun 18, 2004 at 12:07:01AM -0600, heretic@...20... wrote:
: > nbd-server.c: In function `mainloop":
: > nbd-server.c:674: error: `NBD_CMD_DISC" undeclared (first use in this
: > function)
: > nbd-server.c:674: error: (Each undeclared identifier is reported only once
: > nbd-server.c:674: error: for each function it appears in.)
: >
: > Thoughts?
:
: Your nbd.h is outdated. I"ll try to add a check for that in configure;
: in the mean time, please get an updated nbd.h from a recent linux kernel
: source tree (include/linux/nbd.h), put it in your build directory, and
: re-run configure before you compile again.
I fail to see what's outdated about 2.4.26's kernel headers... which is
what I'm compiling against ;^). The reason for this is that the 2.4
headers is missing:
enum {
NBD_CMD_READ = 0,
NBD_CMD_WRITE = 1,
*NBD_CMD_DISC* = 2
};
somehow this code made it into the 2.5 tree pretty soon, and the entire
era of 2.4 kernels was skipped?
apart from this mishap it all seems to work on 2.4.25/2.4.26 kernels, I
don't know weather my hackfix actually is correct but I managed to mount
a device over localhost:XXXX as well, which leaves me to the following
questions:
1) if it works (reasonably) why is the code including only 2.6
compatible headers?
2) how come the kernel space driver is 5 years old and the nbd-tools
work with 2.6 ? ;^)
and of course:
3) how can I get my 2.4 kernel properly working!
I'm willing to put some debugging time in this as I intend not to switch
over any time soon to 2.6 (lack of confidence and demand of
stability)... ideas?
Auke Kok
Reply to: