bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

openpty: fix for AIX


From: Bruno Haible
Subject: openpty: fix for AIX
Date: Fri, 21 Oct 2011 02:15:38 +0200
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

On AIX 6.1, I'm seeing this compilation failure:

gcc -mlong-double-64 -D_ALL_SOURCE -DHAVE_CONFIG_H -I. -I..  
-DGNULIB_STRICT_CHECKING=1  -Wall  -g -O2 -MT openpty.o -MD -MP -MF 
.deps/openpty.Tpo -c -o openpty.o openpty.c
openpty.c:50: error: conflicting types for 'openpty'
./pty.h:407: error: previous declaration of 'openpty' was here
make: 1254-004 The error code from the last command is 1.

The reason is that 'struct winsize' was not yet defined at the moment
of the declaration in pty.h. This fixes it:


2011-10-20  Bruno Haible  <address@hidden>

        openpty: Avoid compilation error on AIX 6.1.
        * lib/pty.in.h [AIX]: Include <sys/ioctl.h>, for 'struct winsize'.

--- lib/pty.in.h.orig   Fri Oct 21 02:10:44 2011
+++ lib/pty.in.h        Fri Oct 21 02:09:14 2011
@@ -42,6 +42,9 @@
 
 /* Get 'struct termios' and 'struct winsize'.  */
 #include <termios.h>
+#if defined _AIX
+# include <sys/ioctl.h>
+#endif
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 

-- 
In memoriam Eduard Brücklmeier <http://en.wikipedia.org/wiki/Eduard_Brücklmeier>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]