Without this, cygwin failed to compile: In file included from ../src/rpc/virnetmessage.h:24, from ../src/rpc/virnetclient.h:27, from remote/remote_driver.c:31: ../src/rpc/virnetprotocol.h:9:21: error: rpc/rpc.h: No such file or directory With that fixed, compilation warned: rpc/virnetsocket.c: In function 'virNetSocketNewListenUNIX': rpc/virnetsocket.c:347: warning: format '%d' expects type 'int', but argument 8 has type 'gid_t' [-Wformat] rpc/virnetsocket.c: In function 'virNetSocketGetLocalIdentity': rpc/virnetsocket.c:743: warning: pointer targets in passing argument 5 of 'getsockopt' differ in signedness * src/Makefile.am (libvirt_driver_remote_la_CFLAGS) (libvirt_net_rpc_client_la_CFLAGS) (libvirt_net_rpc_server_la_CFLAGS): Include XDR_CFLAGS, for rpc headers on cygwin. * src/rpc/virnetsocket.c (virNetSocketNewListenUNIX) (virNetSocketGetLocalIdentity): Avoid compiler warnings. --- Pushing under the build-breaker rule. src/Makefile.am | 5 ++++- src/rpc/virnetsocket.c | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index b7e4991..009ff25 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -578,6 +578,7 @@ libvirt_la_BUILT_LIBADD += libvirt_driver_remote.la endif libvirt_driver_remote_la_CFLAGS = \ $(GNUTLS_CFLAGS) \ + $(XDR_CFLAGS) \ -I@top_srcdir@/src/conf \ -I@top_srcdir@/src/rpc \ $(AM_CFLAGS) @@ -1293,6 +1294,7 @@ EXTRA_DIST += \ endif libvirt_net_rpc_server_la_CFLAGS = \ $(AVAHI_CFLAGS) \ + $(XDR_CFLAGS) \ $(AM_CFLAGS) \ $(POLKIT_CFLAGS) libvirt_net_rpc_server_la_LDFLAGS = \ @@ -1309,7 +1311,8 @@ libvirt_net_rpc_client_la_SOURCES = \ rpc/virnetclientstream.h rpc/virnetclientstream.c \ rpc/virnetclient.h rpc/virnetclient.c libvirt_net_rpc_client_la_CFLAGS = \ - $(AM_CFLAGS) + $(AM_CFLAGS) \ + $(XDR_CFLAGS) libvirt_net_rpc_client_la_LDFLAGS = \ $(AM_LDFLAGS) \ $(CYGWIN_EXTRA_LDFLAGS) \ diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c index dcdc937..41b691a 100644 --- a/src/rpc/virnetsocket.c +++ b/src/rpc/virnetsocket.c @@ -345,8 +345,8 @@ int virNetSocketNewListenUNIX(const char *path, */ if (grp != 0 && chown(path, -1, grp)) { virReportSystemError(errno, - _("Failed to change group ID of '%s' to %d"), - path, grp); + _("Failed to change group ID of '%s' to %u"), + path, (unsigned int) grp); goto error; } @@ -737,7 +737,7 @@ int virNetSocketGetLocalIdentity(virNetSocketPtr sock, pid_t *pid) { struct ucred cr; - unsigned int cr_len = sizeof (cr); + socklen_t cr_len = sizeof (cr); virMutexLock(&sock->lock); if (getsockopt(sock->fd, SOL_SOCKET, SO_PEERCRED, &cr, &cr_len) < 0) { -- 1.7.4.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list