openbsd-ports/sysutils/libvirt/patches/patch-src_rpc_virnetsocket_c
jasper bda106b1d9 import libvirt 0.10.1
Libvirt is collection of software that provides a convenient way to
manage virtual machines and other virtualization functionality, such as
storage and network interface management. These software pieces include
an API library, a daemon (libvirtd), and a command line utility (virsh).

Note that OpenBSD cannot act as a virtualization host yet, so libvirtd
is not provided in this package.
[...]

feedback/ok aja@
2012-09-04 14:41:15 +00:00

19 lines
553 B
Plaintext

$OpenBSD: patch-src_rpc_virnetsocket_c,v 1.1.1.1 2012/09/04 14:41:15 jasper Exp $
Use sockpeercred on OpenBSD.
--- src/rpc/virnetsocket.c.orig Wed Aug 22 12:00:59 2012
+++ src/rpc/virnetsocket.c Tue Sep 4 14:46:27 2012
@@ -988,7 +988,11 @@ int virNetSocketGetUNIXIdentity(virNetSocketPtr sock,
gid_t *gid,
pid_t *pid)
{
+#if defined (__OpenBSD__)
+ struct sockpeercred cr;
+#else
struct ucred cr;
+#endif
socklen_t cr_len = sizeof(cr);
virMutexLock(&sock->lock);