Among many bugfixes, changes and translations: * GIO now has kqueue support for GFileMonitor (BSDs, Mac OS) * GTask (the new GAsyncResult implementation) has landed * We now install a public "gnetworking.h" header that can be used to include the relevant OS-dependent networking headers. This does not really abstract away unix-vs-windows however; error codes, in particular, are incompatible. See NEWS file http://git.gnome.org/browse/glib/plain/NEWS?id=2.36.1 for details. Patches removed: - patch-aj: Per PR pkg/41601: Bug 133344 is closed and compile tested by Joern Clausen - patch-at: Fixed in b26fb3ae (Bug 687600) - patch-cf: Adds sys/param.h - if still needed, should go into gnetworking.h.in XXX might still be needed - patch-cg: Fixed (or changed anyway) in 6f8f1f70 and 52a81a7d (Bug 688681) - patch-ci: Fixed in a33aaad0 (Bug 637013) - patch-glib_goption.c: Fixed in f9a6a974 - patch-glib_tests_include.c: Fixed in d2b7ee62 (Bug 672406) Patches changed: - patch-ak: First chunk fixed in 5fbdd3aa (Bug 691011) - patch-ap: Added NetBSD support to g_credentials_get_unix_pid() First chunk fixed in b377e696 (Bug 623187) - patch-aq: First chunk fixed in b8c13a01 (Bug 688109) Patches added: - patch-gio_glocalfile.c (Reported as Bug 698348)
59 lines
1.5 KiB
Text
59 lines
1.5 KiB
Text
$NetBSD: patch-aq,v 1.6 2013/04/19 22:21:41 prlw1 Exp $
|
|
|
|
--- gio/gsocket.c.orig 2013-03-13 13:39:09.000000000 +0000
|
|
+++ gio/gsocket.c
|
|
@@ -37,6 +37,9 @@
|
|
#include <signal.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
+#ifdef __NetBSD__
|
|
+#include <sys/un.h>
|
|
+#endif
|
|
|
|
#ifndef G_OS_WIN32
|
|
# include <fcntl.h>
|
|
@@ -4349,7 +4352,7 @@ g_socket_get_credentials (GSocket *soc
|
|
|
|
ret = NULL;
|
|
|
|
-#if defined(__linux__) || defined(__OpenBSD__)
|
|
+#if defined(__linux__) || (defined(__OpenBSD__) && !defined(__MirBSD__))
|
|
{
|
|
socklen_t optlen;
|
|
#if defined(__linux__)
|
|
@@ -4384,6 +4387,35 @@ g_socket_get_credentials (GSocket *soc
|
|
&native_creds);
|
|
}
|
|
}
|
|
+#elif defined(__NetBSD__) && defined(LOCAL_PEEREID)
|
|
+ {
|
|
+ struct unpcbid cred;
|
|
+ socklen_t len = sizeof(cred);
|
|
+ if (getsockopt(socket->priv->fd, 0, LOCAL_PEEREID, &cred, &len) < 0)
|
|
+ {
|
|
+ int errsv = get_socket_errno ();
|
|
+ g_set_error (error,
|
|
+ G_IO_ERROR,
|
|
+ socket_io_error_from_errno (errsv),
|
|
+ _("Unable to get pending error: %s"),
|
|
+ socket_strerror (errsv));
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ struct {
|
|
+ pid_t pid;
|
|
+ uid_t uid;
|
|
+ gid_t gid;
|
|
+ } native_creds;
|
|
+ native_creds.uid = cred.unp_euid;
|
|
+ native_creds.gid = cred.unp_egid;
|
|
+ native_creds.pid = cred.unp_pid;
|
|
+ ret = g_credentials_new ();
|
|
+ g_credentials_set_native (ret,
|
|
+ G_CREDENTIALS_TYPE_LINUX_UCRED,
|
|
+ &native_creds);
|
|
+ }
|
|
+ }
|
|
#else
|
|
g_set_error_literal (error,
|
|
G_IO_ERROR,
|