libxl: fix build on platforms where openpty's parameters are not const.
authorChristoph Egger <Christoph.Egger@amd.com>
Thu, 17 May 2012 13:45:43 +0000 (14:45 +0100)
committerChristoph Egger <Christoph.Egger@amd.com>
Thu, 17 May 2012 13:45:43 +0000 (14:45 +0100)
Such as NetBSD. Fixes 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>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_aoutils.c
tools/libxl/libxl_internal.h

index 91e34dea9590c0df6d69db5aea0a1dbe3f37788a..ee0df57ff562a512f18451ca03ac37432515b008 100644 (file)
@@ -230,8 +230,8 @@ static void openpty_exited(libxl__egc *egc, libxl__ev_child *child,
 }
 
 int libxl__openptys(libxl__openpty_state *op,
-                    const struct termios *termp,
-                    const struct winsize *winp) {
+                    struct termios *termp,
+                    struct winsize *winp) {
     /*
      * This is completely crazy.  openpty calls grantpt which the spec
      * says may fork, and may not be called with a SIGCHLD handler.
index 73b991524e9ca3cde704de7cbfa8df9104b5eb6e..85da15562edf6d93e934ad5d589ea799fa292bce 100644 (file)
@@ -1740,8 +1740,8 @@ struct libxl__openpty_result {
 };
 
 int libxl__openptys(libxl__openpty_state *op,
-                    const struct termios *termp,
-                    const struct winsize *winp);
+                    struct termios *termp,
+                    struct winsize *winp);
 
 
 /*----- bootloader -----*/