All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxl: build fix
@ 2011-01-11 14:54 Christoph Egger
  2011-01-11 18:44 ` Ian Jackson
  0 siblings, 1 reply; 13+ messages in thread
From: Christoph Egger @ 2011-01-11 14:54 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 435 bytes --]


Hi!

Attached patch fixes libxl build error:

libxl_dm.c:713: warning: implicit declaration of function 'kill'

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

[-- Attachment #2: xen_libxl_build.diff --]
[-- Type: text/x-diff, Size: 332 bytes --]

diff -r 2007ca4414ab tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c	Tue Jan 11 15:34:30 2011 +0100
+++ b/tools/libxl/libxl_dm.c	Tue Jan 11 15:52:52 2011 +0100
@@ -20,6 +20,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
+#include <signal.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include "libxl_utils.h"

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] libxl: build fix
  2011-01-11 14:54 [PATCH] libxl: build fix Christoph Egger
@ 2011-01-11 18:44 ` Ian Jackson
  0 siblings, 0 replies; 13+ messages in thread
From: Ian Jackson @ 2011-01-11 18:44 UTC (permalink / raw)
  To: Christoph Egger; +Cc: xen-devel

Christoph Egger writes ("[Xen-devel] [PATCH] libxl: build fix"):
> Attached patch fixes libxl build error:
> libxl_dm.c:713: warning: implicit declaration of function 'kill'

Applied, thanks.  I see Keir applied your ctype fix too.

Ian.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] libxl: build fix
  2012-05-16 15:51 Christoph Egger
  2012-05-17 11:41 ` Roger Pau Monne
  2012-05-17 11:44 ` Ian Campbell
@ 2012-05-17 13:47 ` Ian Campbell
  2 siblings, 0 replies; 13+ messages in thread
From: Ian Campbell @ 2012-05-17 13:47 UTC (permalink / raw)
  To: Christoph Egger; +Cc: xen-devel

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.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] libxl: build fix
  2012-05-16 15:51 Christoph Egger
  2012-05-17 11:41 ` Roger Pau Monne
@ 2012-05-17 11:44 ` Ian Campbell
  2012-05-17 13:47 ` Ian Campbell
  2 siblings, 0 replies; 13+ messages in thread
From: Ian Campbell @ 2012-05-17 11:44 UTC (permalink / raw)
  To: Christoph Egger; +Cc: xen-devel

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>
> 
> 
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] libxl: build fix
  2012-05-16 15:51 Christoph Egger
@ 2012-05-17 11:41 ` Roger Pau Monne
  2012-05-17 11:44 ` Ian Campbell
  2012-05-17 13:47 ` Ian Campbell
  2 siblings, 0 replies; 13+ messages in thread
From: Roger Pau Monne @ 2012-05-17 11:41 UTC (permalink / raw)
  To: Christoph Egger; +Cc: 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...

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH] libxl: build fix
@ 2012-05-16 15:51 Christoph Egger
  2012-05-17 11:41 ` Roger Pau Monne
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Christoph Egger @ 2012-05-16 15:51 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 830 bytes --]


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

[-- Attachment #2: xen_libxl.diff --]
[-- Type: text/plain, Size: 1139 bytes --]

diff -r 1463985435ba tools/libxl/libxl_aoutils.c
--- a/tools/libxl/libxl_aoutils.c	Wed May 16 17:17:17 2012 +0200
+++ b/tools/libxl/libxl_aoutils.c	Wed May 16 17:47:51 2012 +0200
@@ -230,8 +230,8 @@ static void openpty_exited(libxl__egc *e
 }
 
 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.
diff -r 1463985435ba tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Wed May 16 17:17:17 2012 +0200
+++ b/tools/libxl/libxl_internal.h	Wed May 16 17:47:51 2012 +0200
@@ -1739,8 +1739,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 -----*/

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] libxl: build fix
  2010-04-13 15:04     ` Ian Jackson
@ 2010-04-14  7:19       ` Christoph Egger
  0 siblings, 0 replies; 13+ messages in thread
From: Christoph Egger @ 2010-04-14  7:19 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

On Tuesday 13 April 2010 17:04:00 Ian Jackson wrote:
> Christoph Egger writes ("Re: [Xen-devel] [PATCH] libxl: build fix"):
> > On NetBSD, the SIG* defines are in <sys/signal.h> which is just
> > included by <signal.h>
> > On NetBSD, both works.
>
> The correct way to discover what the right #include is is not to go on
> a wild goose chase through headers.  It is to read appropriate
> documentation, such as SuSv3:
>   http://www.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html
> Every function or symbol that's in SuS has next to its description a
> statement of what header file(s) are needed.

Yes, you are right. It's my fault. It should have read the manpage. It states 
this clearly, too.

Christoph

-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] libxl: build fix
  2010-04-13 11:49   ` Christoph Egger
@ 2010-04-13 15:04     ` Ian Jackson
  2010-04-14  7:19       ` Christoph Egger
  0 siblings, 1 reply; 13+ messages in thread
From: Ian Jackson @ 2010-04-13 15:04 UTC (permalink / raw)
  To: xen-devel

Christoph Egger writes ("Re: [Xen-devel] [PATCH] libxl: build fix"):
> On NetBSD, the SIG* defines are in <sys/signal.h> which is just
> included by <signal.h>
> On NetBSD, both works.

The correct way to discover what the right #include is is not to go on
a wild goose chase through headers.  It is to read appropriate
documentation, such as SuSv3:
  http://www.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html
Every function or symbol that's in SuS has next to its description a
statement of what header file(s) are needed.

> But you're right, the portable fix is the prefered one.

It's not just "portable", it is not broken.  The NetBSD developers
would be quite entitled to make <sys/signal.h> go away, or not contain
these definitions any more.  I doubt they promise not to.

Ian.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] libxl: build fix
  2010-04-13 11:21 ` Ian Jackson
@ 2010-04-13 11:49   ` Christoph Egger
  2010-04-13 15:04     ` Ian Jackson
  0 siblings, 1 reply; 13+ messages in thread
From: Christoph Egger @ 2010-04-13 11:49 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Tuesday 13 April 2010 13:21:31 Ian Jackson wrote:
> Christoph Egger writes ("[Xen-devel] [PATCH] libxl: build fix"):
> > Attached patch makes libxl compile on NetBSD.
> > <sys/signal.h> is needed to get definition for SIGPIPE and SIG_IGN.
>
> <sys/signal.h> is not a standard header file.  It should be <signal.h>.
>
> Adding
>  #include <signal.h>
> would be correct.

On NetBSD, the SIG* defines are in <sys/signal.h> which is just
included by <signal.h>
On NetBSD, both works.

But you're right, the portable fix is the prefered one.

Christoph


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] libxl: build fix
  2010-04-13 10:16 Christoph Egger
@ 2010-04-13 11:21 ` Ian Jackson
  2010-04-13 11:49   ` Christoph Egger
  0 siblings, 1 reply; 13+ messages in thread
From: Ian Jackson @ 2010-04-13 11:21 UTC (permalink / raw)
  To: Christoph Egger; +Cc: xen-devel

Christoph Egger writes ("[Xen-devel] [PATCH] libxl: build fix"):
> Attached patch makes libxl compile on NetBSD.
> <sys/signal.h> is needed to get definition for SIGPIPE and SIG_IGN.

<sys/signal.h> is not a standard header file.  It should be <signal.h>.

Adding
 #include <signal.h>
would be correct.

Ian.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH] libxl: build fix
@ 2010-04-13 10:16 Christoph Egger
  2010-04-13 11:21 ` Ian Jackson
  0 siblings, 1 reply; 13+ messages in thread
From: Christoph Egger @ 2010-04-13 10:16 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 473 bytes --]


Hi!

Attached patch makes libxl compile on NetBSD.
<sys/signal.h> is needed to get definition for SIGPIPE and SIG_IGN.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

[-- Attachment #2: xen_libxl.diff --]
[-- Type: text/x-diff, Size: 330 bytes --]

diff -r 2a4970daad74 tools/libxl/xl.c
--- a/tools/libxl/xl.c	Tue Apr 13 09:38:54 2010 +0100
+++ b/tools/libxl/xl.c	Tue Apr 13 11:55:30 2010 +0200
@@ -26,6 +26,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <sys/signal.h>
 #include <sys/socket.h>
 #include <sys/select.h>
 #include <arpa/inet.h>

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] libxl: build fix
  2009-12-01 14:40 Christoph Egger
@ 2009-12-04 15:52 ` Ian Jackson
  0 siblings, 0 replies; 13+ messages in thread
From: Ian Jackson @ 2009-12-04 15:52 UTC (permalink / raw)
  To: Christoph Egger; +Cc: xen-devel

Christoph Egger writes ("[Xen-devel] [PATCH] libxl: build fix"):
> Attached patch makes libxl build on NetBSD.

The patch is fine, although I don't generally approve of comments like
the one you've included:

+#include <signal.h> /* for SIGKILL */

I would just say:

+#include <signal.h>

and you can mention SIGKILL in the commit message.


There is an argument that all of these headers should be included in
one place by libxl_internal.h.

Ian.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH] libxl: build fix
@ 2009-12-01 14:40 Christoph Egger
  2009-12-04 15:52 ` Ian Jackson
  0 siblings, 1 reply; 13+ messages in thread
From: Christoph Egger @ 2009-12-01 14:40 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 402 bytes --]


Hi!

Attached patch makes libxl build on NetBSD.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>

-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

[-- Attachment #2: xen_tools_libxl.diff --]
[-- Type: text/x-diff, Size: 346 bytes --]

diff -r 030589859a8f tools/libxl/libxl_exec.c
--- a/tools/libxl/libxl_exec.c	Tue Dec 01 15:14:29 2009 +0100
+++ b/tools/libxl/libxl_exec.c	Tue Dec 01 15:40:57 2009 +0100
@@ -25,6 +25,7 @@
 #include <assert.h>
 #include <sys/types.h>
 #include <sys/wait.h>
+#include <signal.h> /* for SIGKILL */
 
 #include "libxl.h"
 #include "libxl_internal.h"

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-05-17 13:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-11 14:54 [PATCH] libxl: build fix Christoph Egger
2011-01-11 18:44 ` Ian Jackson
  -- strict thread matches above, loose matches on Subject: below --
2012-05-16 15:51 Christoph Egger
2012-05-17 11:41 ` Roger Pau Monne
2012-05-17 11:44 ` Ian Campbell
2012-05-17 13:47 ` Ian Campbell
2010-04-13 10:16 Christoph Egger
2010-04-13 11:21 ` Ian Jackson
2010-04-13 11:49   ` Christoph Egger
2010-04-13 15:04     ` Ian Jackson
2010-04-14  7:19       ` Christoph Egger
2009-12-01 14:40 Christoph Egger
2009-12-04 15:52 ` Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.