openbsd-ports/devel/glib2/patches/patch-gio_tests_gdbus-peer_c

29 lines
1.1 KiB
Plaintext
Raw Normal View History

2011-10-08 15:14:17 +00:00
$OpenBSD: patch-gio_tests_gdbus-peer_c,v 1.3 2011/10/08 15:14:17 ajacoutot Exp $
2011-10-08 15:14:17 +00:00
From c739a5df14ff5ee8cf262ce6e1cebdd0096aff5a Mon Sep 17 00:00:00 2001
From: Antoine Jacoutot <ajacoutot@openbsd.org>
Date: Sat, 08 Oct 2011 09:47:20 +0000
Subject: gio: enable test_peer regression test for OpenBSD
--- gio/tests/gdbus-peer.c.orig Thu Sep 15 02:01:00 2011
+++ gio/tests/gdbus-peer.c Sat Oct 8 11:43:57 2011
@@ -795,6 +795,18 @@ test_peer (void)
g_assert (native_creds->pid == getpid ());
}
g_object_unref (credentials);
+#elif defined (__OpenBSD__)
+ {
+ struct sockpeercred *native_creds;
+ g_assert_no_error (error);
+ g_assert (G_IS_CREDENTIALS (credentials));
+ native_creds = g_credentials_get_native (credentials, G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED);
+ g_assert (native_creds != NULL);
+ g_assert (native_creds->uid == getuid ());
+ g_assert (native_creds->gid == getgid ());
+ g_assert (native_creds->pid == getpid ());
+ }
+ g_object_unref (credentials);
#else
g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
g_assert (credentials == NULL);