|
From: Jeroen N. W. <jn...@xs...> - 2004-08-18 07:24:46
|
> In message <595...@we...> > "Jeroen N. Witmond" <jn...@xs...> wrote: > >> During configuration of valgrind from CVS on debian sarge (the upcoming >> 3.1 release) I ran into the same problem with linux/mii.h Sefer Tov >> mentions at the bottom of >> http://article.gmane.org/gmane.comp.debugging.valgrind/1549/match=+mii >> and >> Nicholas Nethercote in >> http://lists.gnu.org/archive/html/bug-autoconf/2004-06/msg00056.html >> using kernel 2.4.26-1-386 and gcc version 3.3.4 (Debian >> 1:3.3.4-6sarge1). > > You may indeed have hit the same problem. > >> FWIW, I think this is a kernel header bug; file linux/mii.h does not >> #define __KERNEL__ before including file linux/types.h, or should use >> __u16 instead of u16. > > But it has nothing to do with this, as we are careful to define u16 > before including mii.h in vg_unsafe.h. The error above occurs during configuration, where you do not define u16. During the compilation of valgrind, the error does not occur. > >> Compilation results in: >> In file included from >> /home/jeroen/projects/valgrind/coregrind/vg_unsafe.h:56, >> from >> /home/jeroen/projects/valgrind/coregrind/vg_syscalls.c:35: >> /usr/include/asm/ipc.h:10: error: field `__user' has incomplete type >> /usr/include/asm/ipc.h:10: error: parse error before '*' token >> /usr/include/asm/ipc.h:12: error: parse error before '}' token >> >> These can be fixed with the patch below. This has been tested only on >> one >> debian sarge system. > > The include of linux/msg.h was added to CVS a while and should fix > this. Was there some reason you also added the linux/compiler.h test? - I moved the include of linux/msg.h to before the include of asm/ipc.h, because the latter needs 'struct msgbuf'. - I have added the test for linux/compiler.h because debian sarge uses this header, even with a 2.4 kernel, and asm/ipc.h uses the __user annotation. Jeroen. |