diff options
Diffstat (limited to 'devel/glib2/patches')
-rw-r--r-- | devel/glib2/patches/patch-aa | 27 | ||||
-rw-r--r-- | devel/glib2/patches/patch-ak | 27 | ||||
-rw-r--r-- | devel/glib2/patches/patch-ba | 208 | ||||
-rw-r--r-- | devel/glib2/patches/patch-gio_gcredentials.c | 91 | ||||
-rw-r--r-- | devel/glib2/patches/patch-gio_gcredentialsprivate.h | 22 | ||||
-rw-r--r-- | devel/glib2/patches/patch-gio_gioenums.h | 15 | ||||
-rw-r--r-- | devel/glib2/patches/patch-gio_gsocket.c | 31 | ||||
-rw-r--r-- | devel/glib2/patches/patch-gio_gunixcredentialsmessage.c | 16 | ||||
-rw-r--r-- | devel/glib2/patches/patch-gio_tests_credentials.c | 22 | ||||
-rw-r--r-- | devel/glib2/patches/patch-glib_gmessages.c | 38 |
10 files changed, 34 insertions, 463 deletions
diff --git a/devel/glib2/patches/patch-aa b/devel/glib2/patches/patch-aa index 24ad6dbeee5..bcd713cff51 100644 --- a/devel/glib2/patches/patch-aa +++ b/devel/glib2/patches/patch-aa @@ -1,4 +1,11 @@ -$NetBSD: patch-aa,v 1.57 2014/09/05 20:49:55 prlw1 Exp $ +$NetBSD: patch-aa,v 1.58 2014/10/07 23:18:36 prlw1 Exp $ + +- solaris sun studio check and fix +- use pkgsrc libtool +- broken dlopen(NULL,0) detection and workaround + http://bugzilla.gnome.org/show_bug.cgi?id=140329 +- remove unnecessary executions of libtool from configure + https://bugzilla.gnome.org/show_bug.cgi?id=736710 --- configure.orig 2013-10-15 19:14:48.000000000 +0000 +++ configure @@ -85,7 +92,7 @@ $NetBSD: patch-aa,v 1.57 2014/09/05 20:49:55 prlw1 Exp $ else export SED - G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` -+ G_MODULE_LDFLAGS=`(libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` ++ eval G_MODULE_LDFLAGS=$export_dynamic_flag_spec fi G_MODULE_NEED_USCORE=0 G_MODULE_BROKEN_RTLD_GLOBAL=0 @@ -93,7 +100,7 @@ $NetBSD: patch-aa,v 1.57 2014/09/05 20:49:55 prlw1 Exp $ G_MODULE_HAVE_DLERROR=0 if test -z "$G_MODULE_IMPL"; then case "$host" in -@@ -25271,13 +25307,13 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IM +@@ -25271,13 +25307,12 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IM LIBS="$G_MODULE_LIBS $LIBS" LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS" echo "void glib_plugin_test(void) { }" > plugin.c @@ -106,7 +113,6 @@ $NetBSD: patch-aa,v 1.57 2014/09/05 20:49:55 prlw1 Exp $ -shrext ".o" -avoid-version plugin.lo \ -rpath /dont/care >/dev/null 2>&1 - eval `./libtool --config | grep ^objdir` -+ eval `libtool --config | grep ^objdir` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RTLD_GLOBAL brokenness" >&5 $as_echo_n "checking for RTLD_GLOBAL brokenness... " >&6; } if ${glib_cv_rtldglobal_broken+:} false; then : @@ -167,13 +173,12 @@ $NetBSD: patch-aa,v 1.57 2014/09/05 20:49:55 prlw1 Exp $ if test -z "$G_MODULE_IMPL"; then G_MODULE_IMPL=0 G_MODULE_SUPPORTED=false -@@ -25397,7 +25483,7 @@ fi +@@ -25397,7 +25483,5 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the suffix of module shared libraries" >&5 $as_echo_n "checking for the suffix of module shared libraries... " >&6; } export SED -shrext_cmds=`./libtool --config | grep '^shrext_cmds='` -+shrext_cmds=`libtool --config | grep '^shrext_cmds='` - eval $shrext_cmds +-eval $shrext_cmds module=yes eval std_shrext=$shrext_cmds # chop the initial dot @@ -25421,6 +25507,7 @@ fi @@ -249,11 +254,3 @@ $NetBSD: patch-aa,v 1.57 2014/09/05 20:49:55 prlw1 Exp $ ;; esac -@@ -27053,6 +27086,7 @@ case $host in - ;; - *-*-openbsd*) - LDFLAGS="$LDFLAGS -pthread" -+ G_THREAD_LIBS_FOR_GTHREAD="$G_THREAD_LIBS" - ;; - *) - G_THREAD_LIBS_FOR_GTHREAD="$G_THREAD_LIBS" diff --git a/devel/glib2/patches/patch-ak b/devel/glib2/patches/patch-ak index 320e8edd69a..8ac4e7801fd 100644 --- a/devel/glib2/patches/patch-ak +++ b/devel/glib2/patches/patch-ak @@ -1,4 +1,11 @@ -$NetBSD: patch-ak,v 1.17 2013/12/08 13:08:59 prlw1 Exp $ +$NetBSD: patch-ak,v 1.18 2014/10/07 23:18:36 prlw1 Exp $ + +- solaris sun studio check and fix +- use pkgsrc libtool +- broken dlopen(NULL,0) detection and workaround + http://bugzilla.gnome.org/show_bug.cgi?id=140329 +- remove unnecessary executions of libtool from configure + https://bugzilla.gnome.org/show_bug.cgi?id=736710 --- configure.ac.orig 2013-06-09 22:53:13.000000000 +0000 +++ configure.ac @@ -43,7 +50,7 @@ $NetBSD: patch-ak,v 1.17 2013/12/08 13:08:59 prlw1 Exp $ else export SED - G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` -+ G_MODULE_LDFLAGS=`(libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` ++ eval G_MODULE_LDFLAGS=$export_dynamic_flag_spec fi dnl G_MODULE_IMPL= don't reset, so cmd-line can override G_MODULE_NEED_USCORE=0 @@ -52,7 +59,7 @@ $NetBSD: patch-ak,v 1.17 2013/12/08 13:08:59 prlw1 Exp $ G_MODULE_HAVE_DLERROR=0 dnl *** force native WIN32 shared lib loader if test -z "$G_MODULE_IMPL"; then -@@ -1556,13 +1569,13 @@ AS_IF([ test "$G_MODULE_IMPL" = "G_MODUL +@@ -1556,13 +1569,12 @@ AS_IF([ test "$G_MODULE_IMPL" = "G_MODUL LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS" dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness echo "void glib_plugin_test(void) { }" > plugin.c @@ -65,7 +72,6 @@ $NetBSD: patch-ak,v 1.17 2013/12/08 13:08:59 prlw1 Exp $ -shrext ".o" -avoid-version plugin.lo \ -rpath /dont/care >/dev/null 2>&1 - eval `./libtool --config | grep ^objdir` -+ eval `libtool --config | grep ^objdir` AC_CACHE_CHECK([for RTLD_GLOBAL brokenness], glib_cv_rtldglobal_broken,[ AC_TRY_RUN([ @@ -108,13 +114,12 @@ $NetBSD: patch-ak,v 1.17 2013/12/08 13:08:59 prlw1 Exp $ dnl *** done, have we got an implementation? if test -z "$G_MODULE_IMPL"; then G_MODULE_IMPL=0 -@@ -1635,7 +1680,7 @@ fi +@@ -1635,7 +1680,5 @@ fi AC_MSG_CHECKING(for the suffix of module shared libraries) export SED -shrext_cmds=`./libtool --config | grep '^shrext_cmds='` -+shrext_cmds=`libtool --config | grep '^shrext_cmds='` - eval $shrext_cmds +-eval $shrext_cmds module=yes eval std_shrext=$shrext_cmds # chop the initial dot @@ -1654,6 +1699,7 @@ AC_SUBST(G_MODULE_PLUGIN_LIBS) @@ -150,11 +155,3 @@ $NetBSD: patch-ak,v 1.17 2013/12/08 13:08:59 prlw1 Exp $ ;; esac ]) -@@ -2336,6 +2368,7 @@ case $host in - ;; - *-*-openbsd*) - LDFLAGS="$LDFLAGS -pthread" -+ G_THREAD_LIBS_FOR_GTHREAD="$G_THREAD_LIBS" - ;; - *) - G_THREAD_LIBS_FOR_GTHREAD="$G_THREAD_LIBS" diff --git a/devel/glib2/patches/patch-ba b/devel/glib2/patches/patch-ba deleted file mode 100644 index 7daff1270b2..00000000000 --- a/devel/glib2/patches/patch-ba +++ /dev/null @@ -1,208 +0,0 @@ -$NetBSD: patch-ba,v 1.14 2014/09/05 20:49:55 prlw1 Exp $ - -https://bugzilla.gnome.org/show_bug.cgi?id=583330 - ---- gio/gunixmounts.c.orig 2014-02-12 20:08:36.000000000 +0000 -+++ gio/gunixmounts.c -@@ -150,6 +150,8 @@ struct _GUnixMountMonitor { - GFileMonitor *fstab_monitor; - GFileMonitor *mtab_monitor; - -+ GList *mount_poller_mounts; -+ - GSource *proc_mounts_watch_source; - }; - -@@ -162,6 +164,8 @@ static GUnixMountMonitor *the_mount_moni - static GList *_g_get_unix_mounts (void); - static GList *_g_get_unix_mount_points (void); - -+static guint64 mount_poller_time = 0; -+ - G_DEFINE_TYPE (GUnixMountMonitor, g_unix_mount_monitor, G_TYPE_OBJECT); - - #define MOUNT_POLL_INTERVAL 4000 -@@ -188,6 +192,7 @@ G_DEFINE_TYPE (GUnixMountMonitor, g_unix - #endif - - #if (defined(HAVE_GETVFSSTAT) || defined(HAVE_GETFSSTAT)) && defined(HAVE_FSTAB_H) && defined(HAVE_SYS_MOUNT_H) -+#include <sys/param.h> - #include <sys/ucred.h> - #include <sys/mount.h> - #include <fstab.h> -@@ -353,7 +358,7 @@ get_mtab_read_file (void) - # else - return _PATH_MOUNTED; - # endif --#else -+#else - return "/etc/mtab"; - #endif - } -@@ -367,7 +372,7 @@ get_mtab_monitor_file (void) - # else - return _PATH_MOUNTED; - # endif --#else -+#else - return "/etc/mtab"; - #endif - } -@@ -608,9 +613,9 @@ get_mtab_monitor_file (void) - static GList * - _g_get_unix_mounts (void) - { --#if defined(HAVE_GETVFSSTAT) -+#if defined(USE_STATVFS) - struct statvfs *mntent = NULL; --#elif defined(HAVE_GETFSSTAT) -+#elif defined(USE_STATFS) - struct statfs *mntent = NULL; - #else - #error statfs juggling failed -@@ -621,9 +626,9 @@ _g_get_unix_mounts (void) - GList *return_list; - - /* Pass NOWAIT to avoid blocking trying to update NFS mounts. */ --#if defined(HAVE_GETVFSSTAT) -+#if defined(USE_STATVFS) && defined(HAVE_GETVFSSTAT) - num_mounts = getvfsstat (NULL, 0, ST_NOWAIT); --#elif defined(HAVE_GETFSSTAT) -+#elif defined(USE_STATFS) && defined(HAVE_GETFSSTAT) - num_mounts = getfsstat (NULL, 0, MNT_NOWAIT); - #endif - if (num_mounts == -1) -@@ -631,9 +636,9 @@ _g_get_unix_mounts (void) - - bufsize = num_mounts * sizeof (*mntent); - mntent = g_malloc (bufsize); --#if defined(HAVE_GETVFSSTAT) -+#if defined(USE_STATVFS) && defined(HAVE_GETVFSSTAT) - num_mounts = getvfsstat (mntent, bufsize, ST_NOWAIT); --#elif defined(HAVE_GETFSSTAT) -+#elif defined(USE_STATFS) && defined(HAVE_GETFSSTAT) - num_mounts = getfsstat (mntent, bufsize, MNT_NOWAIT); - #endif - if (num_mounts == -1) -@@ -648,10 +653,13 @@ _g_get_unix_mounts (void) - mount_entry->mount_path = g_strdup (mntent[i].f_mntonname); - mount_entry->device_path = g_strdup (mntent[i].f_mntfromname); - mount_entry->filesystem_type = g_strdup (mntent[i].f_fstypename); --#if defined(HAVE_GETVFSSTAT) -+ -+#if defined(USE_STATVFS) - if (mntent[i].f_flag & ST_RDONLY) --#elif defined(HAVE_GETFSSTAT) -+#elif defined(USE_STATFS) - if (mntent[i].f_flags & MNT_RDONLY) -+#else -+ #error statfs juggling failed - #endif - mount_entry->is_read_only = TRUE; - -@@ -1132,7 +1140,11 @@ get_mounts_timestamp (void) - if (monitor_file) - { - if (stat (monitor_file, &buf) == 0) -- return (guint64)buf.st_mtime; -+ return (guint64)buf.st_mtime; -+ } -+ else -+ { -+ return mount_poller_time; - } - return 0; - } -@@ -1147,7 +1159,7 @@ get_mount_points_timestamp (void) - if (monitor_file) - { - if (stat (monitor_file, &buf) == 0) -- return (guint64)buf.st_mtime; -+ return (guint64)buf.st_mtime; - } - return 0; - } -@@ -1199,9 +1211,9 @@ g_unix_mount_at (const char *mount_path, - mount_entry = l->data; - - if (!found && strcmp (mount_path, mount_entry->mount_path) == 0) -- found = mount_entry; -+ found = mount_entry; - else -- g_unix_mount_free (mount_entry); -+ g_unix_mount_free (mount_entry); - } - g_list_free (mounts); - -@@ -1279,6 +1291,8 @@ g_unix_mount_monitor_finalize (GObject * - g_object_unref (monitor->mtab_monitor); - } - -+ g_list_free_full (monitor->mount_poller_mounts, (GDestroyNotify)g_unix_mount_free); -+ - the_mount_monitor = NULL; - - G_OBJECT_CLASS (g_unix_mount_monitor_parent_class)->finalize (object); -@@ -1370,6 +1384,43 @@ proc_mounts_changed (GIOChannel *chann - return TRUE; - } - -+static gboolean -+mount_change_poller (gpointer user_data) -+{ -+ GUnixMountMonitor *mount_monitor; -+ GList *current_mounts, *new_it, *old_it; -+ gboolean has_changed = FALSE; -+ -+ mount_monitor = user_data; -+ current_mounts = _g_get_unix_mounts (); -+ -+ for ( new_it = current_mounts, old_it = mount_monitor->mount_poller_mounts; -+ new_it != NULL && old_it != NULL; -+ new_it = g_list_next (new_it), old_it = g_list_next (old_it) ) -+ { -+ if (g_unix_mount_compare (new_it->data, old_it->data) != 0) -+ { -+ has_changed = TRUE; -+ break; -+ } -+ } -+ if (!(new_it == NULL && old_it == NULL)) -+ has_changed = TRUE; -+ -+ g_list_free_full (mount_monitor->mount_poller_mounts, -+ (GDestroyNotify)g_unix_mount_free); -+ -+ mount_monitor->mount_poller_mounts = current_mounts; -+ -+ if (has_changed) -+ { -+ mount_poller_time = (guint64)g_get_monotonic_time (); -+ g_signal_emit (mount_monitor, signals[MOUNTS_CHANGED], 0); -+ } -+ -+ return TRUE; -+} -+ - static void - g_unix_mount_monitor_init (GUnixMountMonitor *monitor) - { -@@ -1424,6 +1475,18 @@ g_unix_mount_monitor_init (GUnixMountMon - g_signal_connect (monitor->mtab_monitor, "changed", (GCallback)mtab_file_changed, monitor); - } - } -+ else -+ { -+ monitor->proc_mounts_watch_source = g_timeout_source_new_seconds (3); -+ monitor->mount_poller_mounts = _g_get_unix_mounts (); -+ mount_poller_time = (guint64)g_get_monotonic_time (); -+ g_source_set_callback (monitor->proc_mounts_watch_source, -+ (GSourceFunc)mount_change_poller, -+ monitor, NULL); -+ g_source_attach (monitor->proc_mounts_watch_source, -+ g_main_context_get_thread_default ()); -+ g_source_unref (monitor->proc_mounts_watch_source); -+ } - } - - /** diff --git a/devel/glib2/patches/patch-gio_gcredentials.c b/devel/glib2/patches/patch-gio_gcredentials.c deleted file mode 100644 index 7197080b9d4..00000000000 --- a/devel/glib2/patches/patch-gio_gcredentials.c +++ /dev/null @@ -1,91 +0,0 @@ -$NetBSD: patch-gio_gcredentials.c,v 1.1 2014/09/05 20:49:55 prlw1 Exp $ - -gcredentials: add NetBSD support -https://bugzilla.gnome.org/show_bug.cgi?id=728256 - ---- gio/gcredentials.c.orig 2014-02-03 17:40:41.000000000 +0000 -+++ gio/gcredentials.c -@@ -59,6 +59,9 @@ - * credential type is a struct cmsgcred. This corresponds - * to %G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED. - * -+ * On NetBSD, the native credential type is a struct unpcbid. -+ * This corresponds to %G_CREDENTIALS_TYPE_NETBSD_UNPCBID. -+ * - * On OpenBSD, the native credential type is a struct sockpeercred. - * This corresponds to %G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED. - * -@@ -84,6 +87,8 @@ struct _GCredentials - struct ucred native; - #elif G_CREDENTIALS_USE_FREEBSD_CMSGCRED - struct cmsgcred native; -+#elif G_CREDENTIALS_USE_NETBSD_UNPCBID -+ struct unpcbid native; - #elif G_CREDENTIALS_USE_OPENBSD_SOCKPEERCRED - struct sockpeercred native; - #elif G_CREDENTIALS_USE_SOLARIS_UCRED -@@ -145,6 +150,10 @@ g_credentials_init (GCredentials *creden - credentials->native.cmcred_pid = getpid (); - credentials->native.cmcred_euid = geteuid (); - credentials->native.cmcred_gid = getegid (); -+#elif G_CREDENTIALS_USE_NETBSD_UNPCBID -+ credentials->native.unp_pid = getpid (); -+ credentials->native.unp_euid = geteuid (); -+ credentials->native.unp_egid = getegid (); - #elif G_CREDENTIALS_USE_OPENBSD_SOCKPEERCRED - credentials->native.pid = getpid (); - credentials->native.uid = geteuid (); -@@ -212,6 +221,15 @@ g_credentials_to_string (GCredentials *c - g_string_append_printf (ret, "uid=%" G_GINT64_FORMAT ",", (gint64) credentials->native.cmcred_euid); - if (credentials->native.cmcred_gid != -1) - g_string_append_printf (ret, "gid=%" G_GINT64_FORMAT ",", (gint64) credentials->native.cmcred_gid); -+#elif G_CREDENTIALS_USE_NETBSD_UNPCBID -+ g_string_append (ret, "netbsd-unpcbid:"); -+ if (credentials->native.unp_pid != -1) -+ g_string_append_printf (ret, "pid=%" G_GINT64_FORMAT ",", (gint64) credentials->native.unp_pid); -+ if (credentials->native.unp_euid != -1) -+ g_string_append_printf (ret, "uid=%" G_GINT64_FORMAT ",", (gint64) credentials->native.unp_euid); -+ if (credentials->native.unp_egid != -1) -+ g_string_append_printf (ret, "gid=%" G_GINT64_FORMAT ",", (gint64) credentials->native.unp_egid); -+ ret->str[ret->len - 1] = '\0'; - #elif G_CREDENTIALS_USE_OPENBSD_SOCKPEERCRED - g_string_append (ret, "openbsd-sockpeercred:"); - if (credentials->native.pid != -1) -@@ -278,6 +296,9 @@ g_credentials_is_same_user (GCredentials - #elif G_CREDENTIALS_USE_FREEBSD_CMSGCRED - if (credentials->native.cmcred_euid == other_credentials->native.cmcred_euid) - ret = TRUE; -+#elif G_CREDENTIALS_USE_NETBSD_UNPCBID -+ if (credentials->native.unp_euid == other_credentials->native.unp_euid) -+ ret = TRUE; - #elif G_CREDENTIALS_USE_OPENBSD_SOCKPEERCRED - if (credentials->native.uid == other_credentials->native.uid) - ret = TRUE; -@@ -431,6 +452,8 @@ g_credentials_get_unix_user (GCredential - ret = credentials->native.uid; - #elif G_CREDENTIALS_USE_FREEBSD_CMSGCRED - ret = credentials->native.cmcred_euid; -+#elif G_CREDENTIALS_USE_NETBSD_UNPCBID -+ ret = credentials->native.unp_euid; - #elif G_CREDENTIALS_USE_OPENBSD_SOCKPEERCRED - ret = credentials->native.uid; - #elif G_CREDENTIALS_USE_SOLARIS_UCRED -@@ -475,6 +498,8 @@ g_credentials_get_unix_pid (GCredentials - ret = credentials->native.pid; - #elif G_CREDENTIALS_USE_FREEBSD_CMSGCRED - ret = credentials->native.cmcred_pid; -+#elif G_CREDENTIALS_USE_NETBSD_UNPCBID -+ ret = credentials->native.unp_pid; - #elif G_CREDENTIALS_USE_OPENBSD_SOCKPEERCRED - ret = credentials->native.pid; - #elif G_CREDENTIALS_USE_SOLARIS_UCRED -@@ -526,6 +551,9 @@ g_credentials_set_unix_user (GCredential - #elif G_CREDENTIALS_USE_FREEBSD_CMSGCRED - credentials->native.cmcred_euid = uid; - ret = TRUE; -+#elif G_CREDENTIALS_USE_NETBSD_UNPCBID -+ credentials->native.unp_euid = uid; -+ ret = TRUE; - #elif G_CREDENTIALS_USE_OPENBSD_SOCKPEERCRED - credentials->native.uid = uid; - ret = TRUE; diff --git a/devel/glib2/patches/patch-gio_gcredentialsprivate.h b/devel/glib2/patches/patch-gio_gcredentialsprivate.h deleted file mode 100644 index 5feffdc32aa..00000000000 --- a/devel/glib2/patches/patch-gio_gcredentialsprivate.h +++ /dev/null @@ -1,22 +0,0 @@ -$NetBSD: patch-gio_gcredentialsprivate.h,v 1.1 2014/09/05 20:49:55 prlw1 Exp $ - -gcredentials: add NetBSD support -https://bugzilla.gnome.org/show_bug.cgi?id=728256 - ---- gio/gcredentialsprivate.h.orig 2014-02-03 17:40:41.000000000 +0000 -+++ gio/gcredentialsprivate.h -@@ -39,6 +39,14 @@ - #define G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED 1 - #define G_CREDENTIALS_SPOOFING_SUPPORTED 1 - -+#elif defined(__NetBSD__) -+#define G_CREDENTIALS_SUPPORTED 1 -+#define G_CREDENTIALS_USE_NETBSD_UNPCBID 1 -+#define G_CREDENTIALS_NATIVE_TYPE G_CREDENTIALS_TYPE_NETBSD_UNPCBID -+#define G_CREDENTIALS_NATIVE_SIZE (sizeof (struct unpcbid)) -+#undef G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED -+#define G_CREDENTIALS_SPOOFING_SUPPORTED 1 -+ - #elif defined(__OpenBSD__) - #define G_CREDENTIALS_SUPPORTED 1 - #define G_CREDENTIALS_USE_OPENBSD_SOCKPEERCRED 1 diff --git a/devel/glib2/patches/patch-gio_gioenums.h b/devel/glib2/patches/patch-gio_gioenums.h index 7bd67819e40..6cdad2fcde5 100644 --- a/devel/glib2/patches/patch-gio_gioenums.h +++ b/devel/glib2/patches/patch-gio_gioenums.h @@ -1,21 +1,26 @@ -$NetBSD: patch-gio_gioenums.h,v 1.2 2014/10/01 12:14:42 prlw1 Exp $ +$NetBSD: patch-gio_gioenums.h,v 1.3 2014/10/07 23:18:36 prlw1 Exp $ -gcredentials: add NetBSD support +Revert unintentional change to enum values https://bugzilla.gnome.org/show_bug.cgi?id=728256 ---- gio/gioenums.h.orig 2014-03-24 18:50:42.000000000 +0000 +--- gio/gioenums.h.orig 2014-09-22 13:42:12.000000000 +0000 +++ gio/gioenums.h -@@ -1354,6 +1354,7 @@ typedef enum +@@ -1364,9 +1364,9 @@ typedef enum + * @G_CREDENTIALS_TYPE_INVALID: Indicates an invalid native credential type. + * @G_CREDENTIALS_TYPE_LINUX_UCRED: The native credentials type is a <type>struct ucred</type>. * @G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED: The native credentials type is a <type>struct cmsgcred</type>. +- * @G_CREDENTIALS_TYPE_NETBSD_UNPCBID: The native credentials type is a <type>struct unpcbid</type>. * @G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED: The native credentials type is a <type>struct sockpeercred</type>. Added in 2.30. * @G_CREDENTIALS_TYPE_SOLARIS_UCRED: The native credentials type is a <type>ucred_t</type>. Added in 2.40. + * @G_CREDENTIALS_TYPE_NETBSD_UNPCBID: The native credentials type is a <type>struct unpcbid</type>. * * Enumeration describing different kinds of native credential types. * -@@ -1365,7 +1366,8 @@ typedef enum +@@ -1377,9 +1377,9 @@ typedef enum + G_CREDENTIALS_TYPE_INVALID, G_CREDENTIALS_TYPE_LINUX_UCRED, G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED, +- G_CREDENTIALS_TYPE_NETBSD_UNPCBID, G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED, - G_CREDENTIALS_TYPE_SOLARIS_UCRED + G_CREDENTIALS_TYPE_SOLARIS_UCRED, diff --git a/devel/glib2/patches/patch-gio_gsocket.c b/devel/glib2/patches/patch-gio_gsocket.c deleted file mode 100644 index 9d158134ff0..00000000000 --- a/devel/glib2/patches/patch-gio_gsocket.c +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD: patch-gio_gsocket.c,v 1.1 2014/09/05 20:49:55 prlw1 Exp $ - -gcredentials: add NetBSD support -https://bugzilla.gnome.org/show_bug.cgi?id=728256 - ---- gio/gsocket.c.orig 2014-02-23 05:47:05.000000000 +0000 -+++ gio/gsocket.c -@@ -4458,6 +4458,23 @@ g_socket_get_credentials (GSocket *soc - native_creds_buf); - } - } -+#elif G_CREDENTIALS_USE_NETBSD_UNPCBID -+ { -+ struct unpcbid cred; -+ socklen_t optlen = sizeof (cred); -+ -+ if (getsockopt (socket->priv->fd, -+ 0, -+ LOCAL_PEEREID, -+ &cred, -+ &optlen) == 0) -+ { -+ ret = g_credentials_new (); -+ g_credentials_set_native (ret, -+ G_CREDENTIALS_NATIVE_TYPE, -+ &cred); -+ } -+ } - #elif G_CREDENTIALS_USE_SOLARIS_UCRED - { - ucred_t *ucred = NULL; diff --git a/devel/glib2/patches/patch-gio_gunixcredentialsmessage.c b/devel/glib2/patches/patch-gio_gunixcredentialsmessage.c deleted file mode 100644 index 6c054640940..00000000000 --- a/devel/glib2/patches/patch-gio_gunixcredentialsmessage.c +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: patch-gio_gunixcredentialsmessage.c,v 1.1 2014/09/05 20:49:55 prlw1 Exp $ - -gcredentials: add NetBSD support -https://bugzilla.gnome.org/show_bug.cgi?id=728256 - ---- gio/gunixcredentialsmessage.c.orig 2014-01-06 19:02:48.000000000 +0000 -+++ gio/gunixcredentialsmessage.c -@@ -89,6 +89,8 @@ g_unix_credentials_message_get_msg_type - return SCM_CREDENTIALS; - #elif G_CREDENTIALS_USE_FREEBSD_CMSGCRED - return SCM_CREDS; -+#elif G_CREDENTIALS_USE_NETBSD_UNPCBID -+ return SCM_CREDS; - #elif G_CREDENTIALS_USE_SOLARIS_UCRED - return SCM_UCRED; - #elif G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED diff --git a/devel/glib2/patches/patch-gio_tests_credentials.c b/devel/glib2/patches/patch-gio_tests_credentials.c deleted file mode 100644 index ee0bfb51b08..00000000000 --- a/devel/glib2/patches/patch-gio_tests_credentials.c +++ /dev/null @@ -1,22 +0,0 @@ -$NetBSD: patch-gio_tests_credentials.c,v 1.1 2014/09/05 20:49:55 prlw1 Exp $ - -gcredentials: add NetBSD support -https://bugzilla.gnome.org/show_bug.cgi?id=728256 - ---- gio/tests/credentials.c.orig 2014-01-06 19:02:48.000000000 +0000 -+++ gio/tests/credentials.c -@@ -100,6 +100,14 @@ test_basic (void) - g_assert_cmpuint (native->cmcred_euid, ==, geteuid ()); - g_assert_cmpuint (native->cmcred_pid, ==, getpid ()); - } -+#elif G_CREDENTIALS_USE_NETBSD_UNPCBID -+ { -+ struct unpcbid *native = g_credentials_get_native (creds, -+ G_CREDENTIALS_TYPE_NETBSD_UNPCBID); -+ -+ g_assert_cmpuint (native->unp_euid, ==, geteuid ()); -+ g_assert_cmpuint (native->unp_pid, ==, getpid ()); -+ } - #elif G_CREDENTIALS_USE_OPENBSD_SOCKPEERCRED - { - struct sockpeercred *native = g_credentials_get_native (creds, diff --git a/devel/glib2/patches/patch-glib_gmessages.c b/devel/glib2/patches/patch-glib_gmessages.c deleted file mode 100644 index 3e1735485f8..00000000000 --- a/devel/glib2/patches/patch-glib_gmessages.c +++ /dev/null @@ -1,38 +0,0 @@ -$NetBSD: patch-glib_gmessages.c,v 1.1 2014/09/05 20:49:55 prlw1 Exp $ - -PR pkg/48318 -https://bugzilla.gnome.org/show_bug.cgi?id=720708 - ---- glib/gmessages.c.orig 2014-02-15 15:31:32.000000000 +0000 -+++ glib/gmessages.c -@@ -1112,15 +1112,21 @@ g_assert_warning (const char *log_domain - const char *pretty_function, - const char *expression) - { -- g_log (log_domain, -- G_LOG_LEVEL_ERROR, -- expression -- ? "file %s: line %d (%s): assertion failed: (%s)" -- : "file %s: line %d (%s): should not be reached", -- file, -- line, -- pretty_function, -- expression); -+ if (expression) -+ g_log (log_domain, -+ G_LOG_LEVEL_ERROR, -+ "file %s: line %d (%s): assertion failed: (%s)", -+ file, -+ line, -+ pretty_function, -+ expression); -+ else -+ g_log (log_domain, -+ G_LOG_LEVEL_ERROR, -+ "file %s: line %d (%s): should not be reached", -+ file, -+ line, -+ pretty_function); - _g_log_abort (FALSE); - abort (); - } |