On Thu, Apr 29, 2010 at 12:58:27 +0200, Cyril Brulebois wrote:

> Hello,
> 
> Quanah Gibson-Mount <qua...@zimbra.com> (28/04/2010):
> > TIOCNOTTY is defined in a system header file.  If the build is
> > failing on this elif, it sounds like you have a missing system
> > header while doing the build.  Please report which OS header defines
> > TIOCNOTTY on your BSD based box.
> 
> k...@kbsd:~$ grep TIOCNOTTY /usr/include/ -r
> /usr/include/sys/ttycom.h:#define       TIOCNOTTY      _IO('t', 113)          
> /* void tty association */
> 
> k...@kbsd:~$ grep ttycom.h -r /usr/include/
> /usr/include/sys/tty.h:#include <sys/ttycom.h>
> /usr/include/bits/ioctls.h:#include <sys/ttycom.h>
> 
> Looks like you may want sys/tty.h here?
> 
sys/ioctl.h should be enough, and it sounds like TIOCNOTTY *is* defined
in your build.  A quick test on the kfreebsd-amd64 porter box shows that
TIOCNOTTY expands as:
((unsigned long) ((0x20000000) | (((0) & 0x1fff) << 16) | ((('t')) << 8) | 
((113))))

from <sys/ioccom.h>:
#define _IOC(inout,group,num,len)       ((unsigned long) \
        ((inout) | (((len) & IOCPARM_MASK) << 16) | ((group) << 8) | (num)))
#define _IO(g,n)        _IOC(IOC_VOID,  (g), (n), 0)

Testing for defined(TIOCNOTTY) instead would probably fix it, I think?

Cheers,
Julien

Attachment: signature.asc
Description: Digital signature

Reply via email to