bttv.h in 2.3.99-pre6

From: Berkley Shands (berkley@cs.wustl.edu)
Date: Thu May 04 2000 - 10:19:37 EST


g++ -o VidServer.o VidServer.cxx -c -D_REENTRANT -DDEBUG=0 -DOUTLINE -ieee -I/usr/X11R6/include -g -O0 -I/include/veneer -I/src/common -I/src/apps/NewRC
In file included from VidServer.cxx:31:
/usr/src/linux/drivers/char/bttv.h:71: syntax error before `*'
VidServer.cxx: In function `int main(int, char **)':
VidServer.cxx:75: warning: integer constant out of range
make[1]: *** [VidServer.o] Error 1

for non-kernel compiles, g++ wants a "struct" before WAIT_QUEUE.
Redhat 6.1 on intel.

quickie patch follows...

berkley

diff -Naur linux-2.3.99-pre6-clean/drivers/char/bttv.h linux-2.3.99-pre6/drivers/char/bttv.h
--- linux-2.3.99-pre6-clean/drivers/char/bttv.h Fri Apr 21 17:19:24 2000
+++ linux-2.3.99-pre6/drivers/char/bttv.h Wed May 3 09:57:33 2000
@@ -32,8 +32,11 @@
 #include "audiochip.h"
 #include "bt848.h"
 
+#if defined(__KERNEL__)
 #define WAIT_QUEUE wait_queue_head_t
-
+#else
+#define WAIT_QUEUE struct wait_queue_head_t
+#endif
 /* returns card type,
    for possible values see lines below beginning with #define BTTV_UNKNOWN
    returns negative value if error ocurred

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:15 EST