mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
build: fix include path for cygwin
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.
This commit is contained in:
parent
343ab98229
commit
c5b6537b1f
@ -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) \
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user