Re: SIGTERM undeclared, virNetSocketFree

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

 



On Thu, Jun 30, 2011 at 07:36:24AM -0700, Jason Helfman wrote:
> Hi,
> 
> I get this error when compiling 0.9.3-rc2 on FreeBSD. Is there a fix for
> this?
> 
> rpc/virnetsocket.c: In function 'virNetSocketFree':
> rpc/virnetsocket.c:654: warning: implicit declaration of function 'kill'
> rpc/virnetsocket.c:654: warning: nested extern declaration of 'kill'
> [-Wnested-externs]
> rpc/virnetsocket.c:654: error: 'SIGTERM' undeclared (first use in this
> function)
> rpc/virnetsocket.c:654: error: (Each undeclared identifier is reported only
> once
> rpc/virnetsocket.c:654: error: for each function it appears in.)
> gmake[3]: *** [libvirt_net_rpc_la-virnetsocket.lo] Error 1
> gmake[3]: Leaving directory
> `/home/jhelfman/ports/devel/libvirt/work/libvirt-0.9.3/src'
> gmake[2]: *** [all] Error 2
> gmake[2]: Leaving directory
> `/home/jhelfman/ports/devel/libvirt/work/libvirt-0.9.3/src'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory
> `/home/jhelfman/ports/devel/libvirt/work/libvirt-0.9.3'
> gmake: *** [all] Error 2
> *** Error code 1

We're using 'kill' without explicitly including signal.h. I suspect
we're lucky to get it indirectly on Linux. Try this patch

diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
index 96d2dfd..7e63d78 100644
--- a/src/rpc/virnetsocket.c
+++ b/src/rpc/virnetsocket.c
@@ -27,6 +27,7 @@
 #include <sys/socket.h>
 #include <unistd.h>
 #include <sys/wait.h>
+#include <signal.h>
 
 #ifdef HAVE_NETINET_TCP_H
 # include <netinet/tcp.h>


Regards,
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 :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]