Hello Karel, thanks for your feedback. On Wed, 26 Mar 2008 15:17:47, Karel Zak wrote: > 1/ I cannot compile ldattach on ppc64, kernel-headers-2.6.24 (asm-powerpc/): > > In file included from ldattach.c:24: > /usr/include/asm/termbits.h:22: error: redefinition of 'struct termios' Oh dear. #include hell. > Why we cannot use standard /usr/include/termios.h? It doesn't provide the definition for termios2 I need. On my development machine (openSUSE 10.3, x86 32 bit userland), 24 #include <termios.h> produces: ldattach.c:90: warning: ‘struct termios2’ declared inside parameter list ldattach.c:90: warning: its scope is only this definition or declaration, which is probably not what you want ldattach.c: In function ‘tcgetattr2’: ldattach.c:92: error: invalid application of ‘sizeof’ to incomplete type ‘struct termios2’ ldattach.c:92: error: array type has incomplete element type ldattach.c:92: error: invalid application of ‘sizeof’ to incomplete type ‘struct termios2’ ldattach.c:92: error: invalid application of ‘sizeof’ to incomplete type ‘struct termios2’ [etc.] I tried 24 #include <asm/termios.h> too, which ends up barfing thusly: In file included from /usr/include/asm/termios.h:7, from ldattach.c:24: /usr/include/asm-i386/termios.h:7: error: redefinition of ‘struct winsize’ /usr/include/asm-i386/termios.h:15: error: redefinition of ‘struct termio’ Directly #including <asm/termbits.h> was really the only way I found to get the thing to compile here. Looks like it's time for some heavy ifdeffery. Any quick ideas? > 2/ I found that: > > asm-parisc/termbits.h <-- has termios2 > asm-parisc/ioctls.h <-- doesn't have TCGETS2, TCSETS2, TCSETSW2, ... Ugh. > it seems like a kernel bug. It also seems that we need to check for > termios2 independently on TCGETS2. I don't think so. Without TCGETS2, I have no use for struct termios2 anyway, so I gain nothing by checking for its existence. Thanks, Tilman
Attachment:
signature.asc
Description: OpenPGP digital signature