Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 46791 - 2.6 headers fix for linux/nbd.h
Summary: 2.6 headers fix for linux/nbd.h
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Tim Yamin (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-04 12:30 UTC by SpanKY
Modified: 2004-04-04 12:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2004-04-04 12:30:49 UTC
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
Comment 1 SpanKY gentoo-dev 2004-04-04 12:39:15 UTC
i'm a tool, was using 2.6.0 on that machine