[libvirt] [PATCH] command: Fix compilation on FreeBSD

kill, SIGTERM and SIGKILL require additional headers. --- src/util/command.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/util/command.c b/src/util/command.c index b488d55..b2a873b 100644 --- a/src/util/command.c +++ b/src/util/command.c @@ -22,9 +22,11 @@ #include <config.h> #include <poll.h> +#include <signal.h> #include <stdarg.h> #include <stdlib.h> #include <sys/stat.h> +#include <sys/types.h> #include <sys/wait.h> #include "command.h" -- 1.7.0.4

On Fri, May 13, 2011 at 07:53:06AM +0200, Matthias Bolte wrote:
kill, SIGTERM and SIGKILL require additional headers. --- src/util/command.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/util/command.c b/src/util/command.c index b488d55..b2a873b 100644 --- a/src/util/command.c +++ b/src/util/command.c @@ -22,9 +22,11 @@ #include <config.h>
#include <poll.h> +#include <signal.h> #include <stdarg.h> #include <stdlib.h> #include <sys/stat.h> +#include <sys/types.h> #include <sys/wait.h>
#include "command.h"
ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On 05/12/2011 11:53 PM, Matthias Bolte wrote:
kill, SIGTERM and SIGKILL require additional headers. --- src/util/command.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/util/command.c b/src/util/command.c index b488d55..b2a873b 100644 --- a/src/util/command.c +++ b/src/util/command.c @@ -22,9 +22,11 @@ #include <config.h>
#include <poll.h> +#include <signal.h>
Definitely.
#include <stdarg.h> #include <stdlib.h> #include <sys/stat.h> +#include <sys/types.h>
Spurious. Gnulib already takes care of this (if it doesn't, and you get a compile error due to not including <sys/types.h>, then please post that to the gnulib list, and I'll fix it upstream). -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

2011/5/13 Eric Blake <eblake@redhat.com>:
On 05/12/2011 11:53 PM, Matthias Bolte wrote:
kill, SIGTERM and SIGKILL require additional headers. --- src/util/command.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/util/command.c b/src/util/command.c index b488d55..b2a873b 100644 --- a/src/util/command.c +++ b/src/util/command.c @@ -22,9 +22,11 @@ #include <config.h>
#include <poll.h> +#include <signal.h>
Definitely.
#include <stdarg.h> #include <stdlib.h> #include <sys/stat.h> +#include <sys/types.h>
Spurious. Gnulib already takes care of this (if it doesn't, and you get a compile error due to not including <sys/types.h>, then please post that to the gnulib list, and I'll fix it upstream).
Actually I didn't test if sys/types.h is really necessary, I just included what the man page said and it worked then. But you're right, it only needs signal.h. I'm pushing this one with the signal.h addition only. Matthias

On Sat, May 14, 2011 at 07:01:06AM +0200, Matthias Bolte thus spake:
2011/5/13 Eric Blake <eblake@redhat.com>:
On 05/12/2011 11:53 PM, Matthias Bolte wrote:
kill, SIGTERM and SIGKILL require additional headers. --- src/util/command.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/util/command.c b/src/util/command.c index b488d55..b2a873b 100644 --- a/src/util/command.c +++ b/src/util/command.c @@ -22,9 +22,11 @@ #include <config.h>
#include <poll.h> +#include <signal.h>
Definitely.
#include <stdarg.h> #include <stdlib.h> #include <sys/stat.h> +#include <sys/types.h>
Spurious. Gnulib already takes care of this (if it doesn't, and you get a compile error due to not including <sys/types.h>, then please post that to the gnulib list, and I'll fix it upstream).
Actually I didn't test if sys/types.h is really necessary, I just included what the man page said and it worked then. But you're right, it only needs signal.h.
I'm pushing this one with the signal.h addition only.
Matthias
I included this patch for FreeBSD, do I need to alter the patch to not include types? Please test the port, if you can. :) Would love feedback! Thanks, Jason -- Jason Helfman System Administrator experts-exchange.com http://www.experts-exchange.com/M_4830110.html E4AD 7CF1 1396 27F6 79DD 4342 5E92 AD66 8C8C FBA5

2011/5/14 Jason Helfman <jhelfman@e-e.com>:
On Sat, May 14, 2011 at 07:01:06AM +0200, Matthias Bolte thus spake:
2011/5/13 Eric Blake <eblake@redhat.com>:
On 05/12/2011 11:53 PM, Matthias Bolte wrote:
kill, SIGTERM and SIGKILL require additional headers. --- src/util/command.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/util/command.c b/src/util/command.c index b488d55..b2a873b 100644 --- a/src/util/command.c +++ b/src/util/command.c @@ -22,9 +22,11 @@ #include <config.h>
#include <poll.h> +#include <signal.h>
Definitely.
#include <stdarg.h> #include <stdlib.h> #include <sys/stat.h> +#include <sys/types.h>
Spurious. Gnulib already takes care of this (if it doesn't, and you get a compile error due to not including <sys/types.h>, then please post that to the gnulib list, and I'll fix it upstream).
Actually I didn't test if sys/types.h is really necessary, I just included what the man page said and it worked then. But you're right, it only needs signal.h.
I'm pushing this one with the signal.h addition only.
Matthias
I included this patch for FreeBSD, do I need to alter the patch to not include types?
You can find the patch I pushed here http://libvirt.org/git/?p=libvirt.git;a=commit;h=fe99c6b3c6911d3769f9faf2bcc... You can also use the original patch, including sys/types.h shouldn't hurt.
Please test the port, if you can. :) Would love feedback!
Thanks, Jason
I did that, see the other mail. Matthias
participants (4)
-
Daniel P. Berrange
-
Eric Blake
-
Jason Helfman
-
Matthias Bolte