From: Heiko Z. <he...@zu...> - 2004-09-09 13:05:14
|
Hi Michael, Michael Reinelt wrote: > Hi Heiko, > >> just tried to compile lcd4linux v0.9.11 with gcc 3.4.1 (+ glibc 2.3.4 >> + nptl) and ran into an error: > > I'm using gcc-3.3.4 here > >> make[1]: Entering directory `/data/build/tmp/lcd4linux-0.9.11' >> gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -Wall -g -O2 -c >> lcd4linux.c > > > [...] > >> gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -Wall -g -O2 -c >> system.c >> In file included from /usr/include/linux/ppp_defs.h:45, >> from /usr/include/net/ppp_defs.h:8, >> from /usr/include/net/if_ppp.h:56, >> from system.c:219: >> /usr/include/linux/crc-ccitt.h:6: error: syntax error before "const" > > I don't think this is related to gcc, but your header files. system.c > includes if_ppp.h, which triggers this error. Maybe one needs to > inclode some other header before if_ppp.... If you take a look at the > crc-ccitt.h file, at line 6, what is there "before const"? Next, try > where this symbol gets defined, and try to include this file manually. > This is the crc-ccit.h file: --- snip --- #ifndef _LINUX_CRC_CCITT_H #define _LINUX_CRC_CCITT_H #include <linux/types.h> extern u16 const crc_ccitt_table[256]; extern u16 crc_ccitt(u16 crc, const u8 *buffer, size_t len); static inline u16 crc_ccitt_byte(u16 crc, const u8 c) { return (crc >> 8) ^ crc_ccitt_table[(crc ^ c) & 0xff]; } #endif /* _LINUX_CRC_CCITT_H */ --- snap --- the types u16 and u8 are not defined. I replaced them with __u8 and __u16 and everything works fine. > btw, you could and should try the CVS version of lcd4linux. The code > is stable, it just lacks documentation... I tried the CVS version, but it had the same problem. Of course I forgott to mention 1 'small' little detail, I'm using Kernel 2.6.8.1. Thanks for the help ! -- Regards Heiko Zuerker http://www.devil-linux.org |