Fix this build error: libxl_aoutils.c: In function ''libxl__openptys'': libxl_aoutils.c:281:13: error: passing argument 4 of ''openpty'' discards qualifiers from pointer target type /usr/include/util.h:92:6: note: expected ''struct termios *'' but argument is of type ''const struct termios *'' libxl_aoutils.c:281:13: error: passing argument 5 of ''openpty'' discards qualifiers from pointer target type /usr/include/util.h:92:6: note: expected ''struct winsize *'' but argument is of type ''const struct winsize *'' Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Christoph Egger wrote:> Fix this build error: > > libxl_aoutils.c: In function ''libxl__openptys'': > libxl_aoutils.c:281:13: error: passing argument 4 of ''openpty'' discards > qualifiers from pointer target type > /usr/include/util.h:92:6: note: expected ''struct termios *'' but argument > is of type ''const struct termios *'' > libxl_aoutils.c:281:13: error: passing argument 5 of ''openpty'' discards > qualifiers from pointer target type > /usr/include/util.h:92:6: note: expected ''struct winsize *'' but argument > is of type ''const struct winsize *'' > > Signed-off-by: Christoph Egger<Christoph.Egger@amd.com>Acked-by: Roger Pau Monne <roger.pau@citrix.com> I''ve tested this on both NetBSD and Debian, and it fixes the problem, without introducing new ones. It''s strange because these are BSD functions, but Linux implementation change the parameters...
On Wed, 2012-05-16 at 16:51 +0100, Christoph Egger wrote:> Fix this build error:on NetBSD I presume. The Linux openpty(3) manpage also notes that the const was only added there in glibc 2.8. I note that CentOS 5 has 2.5 so this would presumably also happen on some old, but still supported, Linux distros. So: Acked-by: Ian Campbell <ian.campbell@citrix.com>> > libxl_aoutils.c: In function ''libxl__openptys'': > libxl_aoutils.c:281:13: error: passing argument 4 of ''openpty'' discards > qualifiers from pointer target type > /usr/include/util.h:92:6: note: expected ''struct termios *'' but argument > is of type ''const struct termios *'' > libxl_aoutils.c:281:13: error: passing argument 5 of ''openpty'' discards > qualifiers from pointer target type > /usr/include/util.h:92:6: note: expected ''struct winsize *'' but argument > is of type ''const struct winsize *'' > > Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> > > >
On Wed, 2012-05-16 at 16:51 +0100, Christoph Egger wrote:> Fix this build error: > > libxl_aoutils.c: In function ''libxl__openptys'': > libxl_aoutils.c:281:13: error: passing argument 4 of ''openpty'' discards > qualifiers from pointer target type > /usr/include/util.h:92:6: note: expected ''struct termios *'' but argument > is of type ''const struct termios *'' > libxl_aoutils.c:281:13: error: passing argument 5 of ''openpty'' discards > qualifiers from pointer target type > /usr/include/util.h:92:6: note: expected ''struct winsize *'' but argument > is of type ''const struct winsize *'' > > Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>Applied, thanks. I improved your commit message to: libxl: fix build on platforms where openpty''s parameters are not const. Such as NetBSD. Fixes this build error: .... Please try and make the summary line contain some useful info, it''s all you see in the default "hg log" etc. Ian.