summaryrefslogtreecommitdiff
path: root/x11/gdm/patches
diff options
context:
space:
mode:
authordrochner <drochner>2007-11-30 20:08:37 +0000
committerdrochner <drochner>2007-11-30 20:08:37 +0000
commit2958882906c6638e660c4009e2a67f12de7563b0 (patch)
tree67ce9f2fd2cc487fa5fdfe89542c0a8ac60ca054 /x11/gdm/patches
parent8930da1cadb295417c265ef7b7fff00fae413cb5 (diff)
downloadpkgsrc-2958882906c6638e660c4009e2a67f12de7563b0.tar.gz
update to 2.20.2
This switches to the gnome-2.20 branch, too many changes to list here. (The update has taken a while because the XDMCP code relies on IPv6-mapped IPv4 sockets which is not so easy on NetBSD.)
Diffstat (limited to 'x11/gdm/patches')
-rw-r--r--x11/gdm/patches/patch-aa68
-rw-r--r--x11/gdm/patches/patch-ab10
-rw-r--r--x11/gdm/patches/patch-ak12
-rw-r--r--x11/gdm/patches/patch-am100
-rw-r--r--x11/gdm/patches/patch-an100
-rw-r--r--x11/gdm/patches/patch-ao22
-rw-r--r--x11/gdm/patches/patch-ap74
-rw-r--r--x11/gdm/patches/patch-aq18
8 files changed, 177 insertions, 227 deletions
diff --git a/x11/gdm/patches/patch-aa b/x11/gdm/patches/patch-aa
index 4b6558fb2c3..701de5f9e5d 100644
--- a/x11/gdm/patches/patch-aa
+++ b/x11/gdm/patches/patch-aa
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.21 2007/04/11 20:40:07 drochner Exp $
+$NetBSD: patch-aa,v 1.22 2007/11/30 20:08:38 drochner Exp $
---- configure.orig 2007-04-09 07:16:44.000000000 +0200
+--- configure.orig 2007-09-17 16:48:17.000000000 +0200
+++ configure
-@@ -28786,7 +28786,9 @@ cat confdefs.h >>conftest.$ac_ext
+@@ -27195,7 +27195,9 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/statvfs.h>
@@ -12,23 +12,57 @@ $NetBSD: patch-aa,v 1.21 2007/04/11 20:40:07 drochner Exp $
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
-@@ -34136,6 +34138,15 @@ case "$host" in
- SOUND_PROGRAM=
- GDMGNOMESESSIONCMD=gnome-session
+@@ -33464,6 +33466,18 @@ case "$host" in
+ HOST_UTMP_LINE_REMOTE=""
+ HOST_UTMP_PSEUDO_DEVICE="false"
;;
+*netbsd*)
-+ GDM_USER_PATH="/bin:/usr/bin"
-+ HALT_COMMAND="/sbin/shutdown -p now"
-+ REBOOT_COMMAND="/sbin/shutdown -r now"
-+ SUSPEND_COMMAND="/usr/sbin/zzz"
-+ XSESSION_SHELL=/bin/sh
-+ SOUND_PROGRAM=/usr/bin/audioplay
-+ GDMGNOMESESSIONCMD="dbus-launch --exit-with-session gnome-session"
++ HOST_GDM_USER_PATH="/bin:/usr/bin"
++ HOST_HALT_COMMAND="/sbin/shutdown -p now"
++ HOST_REBOOT_COMMAND="/sbin/shutdown -r now"
++ HOST_SUSPEND_COMMAND="/usr/sbin/zzz"
++ HOST_XSESSION_SHELL=/bin/sh
++ HOST_SOUND_PROGRAM=/usr/bin/audioplay
++ HOST_GDMGNOMESESSIONCMD="dbus-launch --exit-with-session gnome-session"
++ HOST_UTMP_LINE_ATTACHED="/dev/console"
++ HOST_UTMP_LINE_REMOTE=""
++ HOST_UTMP_PSEUDO_DEVICE="false"
+ ;;
*)
- GDM_USER_PATH="/bin:/usr/bin"
- HALT_COMMAND="/usr/bin/poweroff;/sbin/poweroff;/sbin/shutdown -h now;/usr/sbin/shutdown -h now"
-@@ -34199,6 +34210,11 @@ elif test -x /usr/bin/X; then
+ HOST_GDM_USER_PATH="/bin:/usr/bin"
+ HOST_HALT_COMMAND="/usr/bin/poweroff;/sbin/poweroff;/sbin/shutdown -h now;/usr/sbin/shutdown -h now"
+@@ -33480,18 +33494,18 @@ esac
+
+ # allow user to override the host-specific default
+
+-test "x$GDM_USER_PATH" == x && GDM_USER_PATH=${HOST_GDM_USER_PATH}
+-test "x$GDM_HALT_COMMAND" == x && GDM_HALT_COMMAND=${HOST_GDM_HALT_COMMAND}
+-test "x$HALT_COMMAND" == x && HALT_COMMAND=${HOST_HALT_COMMAND}
+-test "x$REBOOT_COMMAND" == x && REBOOT_COMMAND=${HOST_REBOOT_COMMAND}
+-test "x$SUSPEND_COMMAND" == x && SUSPEND_COMMAND=${HOST_SUSPEND_COMMAND}
+-test "x$XSESSION_SHELL" == x && XSESSION_SHELL=${HOST_XSESSION_SHELL}
+-test "x$SOUND_PROGRAM" == x && SOUND_PROGRAM=${HOST_SOUND_PROGRAM}
+-test "x$GDMGNOMESESSIONCMD" == x && GDMGNOMESESSIONCMD=${HOST_GDMGNOMESESSIONCMD}
+-test "x$UTMP_LINE_ATTACHED" == x && UTMP_LINE_ATTACHED=${HOST_UTMP_LINE_ATTACHED}
+-test "x$UTMP_LINE_REMOTE" == x && UTMP_LINE_REMOTE=${HOST_UTMP_LINE_REMOTE}
+-test "x$UTMP_PSEUDO_DEVICE" == x && UTMP_PSEUDO_DEVICE=${HOST_UTMP_PSEUDO_DEVICE}
+-test "x$GDM_RBAC_SYSCMD_KEYS" == x && GDM_RBAC_SYSCMD_KEYS=${HOST_GDM_RBAC_SYSCMD_KEYS}
++test "x$GDM_USER_PATH" = x && GDM_USER_PATH=${HOST_GDM_USER_PATH}
++test "x$GDM_HALT_COMMAND" = x && GDM_HALT_COMMAND=${HOST_GDM_HALT_COMMAND}
++test "x$HALT_COMMAND" = x && HALT_COMMAND=${HOST_HALT_COMMAND}
++test "x$REBOOT_COMMAND" = x && REBOOT_COMMAND=${HOST_REBOOT_COMMAND}
++test "x$SUSPEND_COMMAND" = x && SUSPEND_COMMAND=${HOST_SUSPEND_COMMAND}
++test "x$XSESSION_SHELL" = x && XSESSION_SHELL=${HOST_XSESSION_SHELL}
++test "x$SOUND_PROGRAM" = x && SOUND_PROGRAM=${HOST_SOUND_PROGRAM}
++test "x$GDMGNOMESESSIONCMD" = x && GDMGNOMESESSIONCMD=${HOST_GDMGNOMESESSIONCMD}
++test "x$UTMP_LINE_ATTACHED" = x && UTMP_LINE_ATTACHED=${HOST_UTMP_LINE_ATTACHED}
++test "x$UTMP_LINE_REMOTE" = x && UTMP_LINE_REMOTE=${HOST_UTMP_LINE_REMOTE}
++test "x$UTMP_PSEUDO_DEVICE" = x && UTMP_PSEUDO_DEVICE=${HOST_UTMP_PSEUDO_DEVICE}
++test "x$GDM_RBAC_SYSCMD_KEYS" = x && GDM_RBAC_SYSCMD_KEYS=${HOST_GDM_RBAC_SYSCMD_KEYS}
+
+ # On Solaris, the /usr/bin/Xserver script is used to decide whether to
+ # use Xsun or Xorg, so this is used on Solaris.
+@@ -33564,6 +33578,11 @@ elif test -x /usr/bin/X; then
X_SERVER_PATH="/usr/bin"
X_SERVER="/usr/bin/X"
X_CONFIG_OPTIONS="-audit 0"
@@ -40,7 +74,7 @@ $NetBSD: patch-aa,v 1.21 2007/04/11 20:40:07 drochner Exp $
else
# what to do, what to do, this is wrong, but this just sets the
# defaults, perhaps this user is cross compiling or some such
-@@ -34208,6 +34224,7 @@ else
+@@ -33573,6 +33592,7 @@ else
GDM_USER_PATH="$GDM_USER_PATH:/usr/bin/X11:/usr/X11R6/bin:/usr/local/bin:/opt/X11R6/bin"
X_CONFIG_OPTIONS="-audit 0"
fi
diff --git a/x11/gdm/patches/patch-ab b/x11/gdm/patches/patch-ab
index ddae0fd6b4d..12e07374bc0 100644
--- a/x11/gdm/patches/patch-ab
+++ b/x11/gdm/patches/patch-ab
@@ -1,10 +1,10 @@
-$NetBSD: patch-ab,v 1.16 2006/07/26 12:36:12 drochner Exp $
+$NetBSD: patch-ab,v 1.17 2007/11/30 20:08:38 drochner Exp $
---- daemon/gdmconfig.c.orig 2006-05-12 07:58:21.000000000 +0200
-+++ daemon/gdmconfig.c
-@@ -38,7 +38,7 @@
- #include <ctype.h>
+--- ./daemon/gdm-daemon-config.c.orig 2007-09-28 17:00:37.000000000 +0200
++++ ./daemon/gdm-daemon-config.c
+@@ -40,7 +40,7 @@
#include <fcntl.h>
+ #include <string.h>
#include <sys/types.h>
-#include <sys/resource.h>
+#include <sys/time.h>
diff --git a/x11/gdm/patches/patch-ak b/x11/gdm/patches/patch-ak
index 33a1df84fb9..fe2f72ff57b 100644
--- a/x11/gdm/patches/patch-ak
+++ b/x11/gdm/patches/patch-ak
@@ -1,16 +1,18 @@
-$NetBSD: patch-ak,v 1.3 2006/03/30 21:25:48 jmmv Exp $
+$NetBSD: patch-ak,v 1.4 2007/11/30 20:08:38 drochner Exp $
---- gui/greeter/Makefile.in.orig 2006-03-13 22:42:37.000000000 +0100
+--- gui/greeter/Makefile.in.orig 2007-09-17 16:48:25.000000000 +0200
+++ gui/greeter/Makefile.in
-@@ -386,9 +386,8 @@ gdmgreeter_SOURCES = \
- greeter_system.h
+@@ -408,10 +408,9 @@ gdmgreeter_SOURCES = \
gdmgreeter_LDADD = \
+ $(EXTRA_GREETER_LIBS) \
- -L$(top_builddir)/gui \
- -lgdmwm \
- -lgdmcommon \
+- -lgdmgreeter \
+ $(top_builddir)/gui/libgdmwm.a \
+ $(top_builddir)/gui/libgdmcommon.a \
- $(top_builddir)/vicious-extensions/libviciousui-minimal.a \
++ $(top_builddir)/gui/libgdmgreeter.a \
+ $(top_builddir)/common/libgdmcommon.a \
$(GLIB_LIBS) \
$(GOBJECT_LIBS) \
diff --git a/x11/gdm/patches/patch-am b/x11/gdm/patches/patch-am
deleted file mode 100644
index 80d4cb263cb..00000000000
--- a/x11/gdm/patches/patch-am
+++ /dev/null
@@ -1,100 +0,0 @@
-$NetBSD: patch-am,v 1.3 2007/10/11 09:35:11 hauke Exp $
-
---- daemon/verify-shadow.c.orig 2007-07-30 22:06:56.000000000 +0200
-+++ daemon/verify-shadow.c
-@@ -199,7 +199,7 @@ authenticate_again:
-
- if (pwent == NULL) {
- gdm_sleep_no_signal (gdm_get_value_int (GDM_KEY_RETRY_DELAY));
-- gdm_error (_("Couldn't authenticate user \"%s\""), login);
-+ gdm_error ("Couldn't authenticate user");
-
- print_cant_auth_errbox ();
-
-@@ -213,7 +213,7 @@ authenticate_again:
- if (ppasswd == NULL || (ppasswd[0] != '\0' &&
- strcmp (crypt (passwd, ppasswd), ppasswd) != 0)) {
- gdm_sleep_no_signal (gdm_get_value_int (GDM_KEY_RETRY_DELAY));
-- gdm_error (_("Couldn't authenticate user \"%s\""), login);
-+ gdm_error ("Couldn't authenticate user");
-
- print_cant_auth_errbox ();
-
-@@ -226,7 +226,7 @@ authenticate_again:
- if ( ( ! gdm_get_value_bool (GDM_KEY_ALLOW_ROOT)||
- ( ! gdm_get_value_bool (GDM_KEY_ALLOW_REMOTE_ROOT) && ! local) ) &&
- pwent->pw_uid == 0) {
-- gdm_error (_("Root login disallowed on display '%s'"), display);
-+ gdm_error ("Root login disallowed on display '%s'", display);
- gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX,
- _("The system administrator "
- "is not allowed to login "
-@@ -244,7 +244,7 @@ authenticate_again:
- /* Check with the 'loginrestrictions' function
- if the user has been disallowed */
- if (loginrestrictions (login, 0, NULL, &message) != 0) {
-- gdm_error (_("User %s not allowed to log in"), login);
-+ gdm_error ("User not allowed to log in");
- gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX,
- _("\nThe system administrator "
- "has disabled your "
-@@ -268,7 +268,7 @@ authenticate_again:
- (strcmp (pwent->pw_shell, "/sbin/nologin") == 0 ||
- strcmp (pwent->pw_shell, "/bin/true") == 0 ||
- strcmp (pwent->pw_shell, "/bin/false") == 0)) {
-- gdm_error (_("User %s not allowed to log in"), login);
-+ gdm_error ("User not allowed to log in");
- gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX,
- _("\nThe system administrator "
- "has disabled your "
-@@ -293,7 +293,7 @@ authenticate_again:
- }
-
- if ( ! gdm_setup_gids (login, pwent->pw_gid)) {
-- gdm_error (_("Cannot set user group for %s"), login);
-+ gdm_error ("Cannot set user group");
- gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX,
- _("\nCannot set your user group; "
- "you will not be able to log in. "
-@@ -306,7 +306,7 @@ authenticate_again:
-
- switch (passwdexpired (login, &info_msg)) {
- case 1 :
-- gdm_error (_("Password of %s has expired"), login);
-+ gdm_error ("User password has expired");
- gdm_error_box (d, GTK_MESSAGE_ERROR,
- _("You are required to change your password.\n"
- "Please choose a new one."));
-@@ -380,7 +380,7 @@ authenticate_again:
- break;
-
- case 2 :
-- gdm_error (_("Password of %s has expired"), login);
-+ gdm_error ("User password has expired");
- gdm_error_box (d, GTK_MESSAGE_ERROR,
- _("Your password has expired.\n"
- "Only a system administrator can now change it"));
-@@ -389,7 +389,7 @@ authenticate_again:
- break;
-
- case -1 :
-- gdm_error (_("Internal error on passwdexpired"));
-+ gdm_error ("Internal error on passwdexpired");
- gdm_error_box (d, GTK_MESSAGE_ERROR,
- _("An internal error occurred. You will not be able to log in.\n"
- "Please try again later or contact your system administrator."));
-@@ -426,12 +426,12 @@ gdm_verify_setup_user (GdmDisplay *d, co
-
- pwent = getpwnam (login);
- if (pwent == NULL) {
-- gdm_error (_("Cannot get passwd structure for %s"), login);
-+ gdm_error ("Cannot get passwd structure for user");
- return FALSE;
- }
-
- if ( ! gdm_setup_gids (login, pwent->pw_gid)) {
-- gdm_error (_("Cannot set user group for %s"), login);
-+ gdm_error ("Cannot set user group");
- gdm_error_box (d,
- GTK_MESSAGE_ERROR,
- _("\nCannot set your user group; "
diff --git a/x11/gdm/patches/patch-an b/x11/gdm/patches/patch-an
deleted file mode 100644
index 19655b8f9ec..00000000000
--- a/x11/gdm/patches/patch-an
+++ /dev/null
@@ -1,100 +0,0 @@
-$NetBSD: patch-an,v 1.1 2007/10/11 09:35:11 hauke Exp $
-
---- daemon/verify-crypt.c.orig 2007-07-30 22:06:56.000000000 +0200
-+++ daemon/verify-crypt.c
-@@ -178,7 +178,7 @@ authenticate_again:
-
- if (pwent == NULL) {
- gdm_sleep_no_signal (gdm_get_value_int (GDM_KEY_RETRY_DELAY));
-- gdm_error (_("Couldn't authenticate user \"%s\""), login);
-+ gdm_error ("Couldn't authenticate user");
-
- print_cant_auth_errbox ();
-
-@@ -192,7 +192,7 @@ authenticate_again:
- if (ppasswd == NULL || (ppasswd[0] != '\0' &&
- strcmp (crypt (passwd, ppasswd), ppasswd) != 0)) {
- gdm_sleep_no_signal (gdm_get_value_int (GDM_KEY_RETRY_DELAY));
-- gdm_error (_("Couldn't authenticate user \"%s\""), login);
-+ gdm_error ("Couldn't authenticate user");
-
- print_cant_auth_errbox ();
-
-@@ -205,7 +205,7 @@ authenticate_again:
- if ( ( ! gdm_get_value_bool (GDM_KEY_ALLOW_ROOT)||
- ( ! gdm_get_value_bool (GDM_KEY_ALLOW_REMOTE_ROOT) && ! local) ) &&
- pwent->pw_uid == 0) {
-- gdm_error (_("Root login disallowed on display '%s'"), display);
-+ gdm_error ("Root login disallowed on display '%s'", display);
- gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX,
- _("The system administrator "
- "is not allowed to login "
-@@ -223,7 +223,7 @@ authenticate_again:
- /* Check with the 'loginrestrictions' function
- if the user has been disallowed */
- if (loginrestrictions (login, 0, NULL, &message) != 0) {
-- gdm_error (_("User %s not allowed to log in"), login);
-+ gdm_error ("User not allowed to log in");
- gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX,
- _("\nThe system administrator "
- "has disabled your "
-@@ -247,7 +247,7 @@ authenticate_again:
- (strcmp (pwent->pw_shell, "/sbin/nologin") == 0 ||
- strcmp (pwent->pw_shell, "/bin/true") == 0 ||
- strcmp (pwent->pw_shell, "/bin/false") == 0)) {
-- gdm_error (_("User %s not allowed to log in"), login);
-+ gdm_error ("User not allowed to log in");
- gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX,
- _("\nThe system administrator "
- "has disabled your "
-@@ -272,7 +272,7 @@ authenticate_again:
- }
-
- if ( ! gdm_setup_gids (login, pwent->pw_gid)) {
-- gdm_error (_("Cannot set user group for %s"), login);
-+ gdm_error ("Cannot set user group");
- gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX,
- _("\nCannot set your user group; "
- "you will not be able to log in. "
-@@ -285,7 +285,7 @@ authenticate_again:
-
- switch (passwdexpired (login, &info_msg)) {
- case 1 :
-- gdm_error (_("Password of %s has expired"), login);
-+ gdm_error ("User password has expired");
- gdm_error_box (d, GTK_MESSAGE_ERROR,
- _("You are required to change your password.\n"
- "Please choose a new one."));
-@@ -358,7 +358,7 @@ authenticate_again:
- break;
-
- case 2 :
-- gdm_error (_("Password of %s has expired"), login);
-+ gdm_error ("User password has expired");
- gdm_error_box (d, GTK_MESSAGE_ERROR,
- _("Your password has expired.\n"
- "Only a system administrator can now change it"));
-@@ -367,7 +367,7 @@ authenticate_again:
- break;
-
- case -1 :
-- gdm_error (_("Internal error on passwdexpired"));
-+ gdm_error ("Internal error on passwdexpired");
- gdm_error_box (d, GTK_MESSAGE_ERROR,
- _("An internal error occurred. You will not be able to log in.\n"
- "Please try again later or contact your system administrator."));
-@@ -405,12 +405,12 @@ gdm_verify_setup_user (GdmDisplay *d,
-
- pwent = getpwnam (login);
- if (pwent == NULL) {
-- gdm_error (_("Cannot get passwd structure for %s"), login);
-+ gdm_error ("Cannot get passwd structure for %s", login);
- return FALSE;
- }
-
- if ( ! gdm_setup_gids (login, pwent->pw_gid)) {
-- gdm_error (_("Cannot set user group for %s"), login);
-+ gdm_error ("Cannot set user group");
- gdm_error_box (d,
- GTK_MESSAGE_ERROR,
- _("\nCannot set your user group; "
diff --git a/x11/gdm/patches/patch-ao b/x11/gdm/patches/patch-ao
new file mode 100644
index 00000000000..494f427a60d
--- /dev/null
+++ b/x11/gdm/patches/patch-ao
@@ -0,0 +1,22 @@
+$NetBSD: patch-ao,v 1.1 2007/11/30 20:08:39 drochner Exp $
+
+--- ./daemon/slave.c.orig 2007-09-17 16:45:50.000000000 +0200
++++ ./daemon/slave.c
+@@ -3694,7 +3694,7 @@ session_child_run (struct passwd *pwent,
+ "/usr/local/share/:/usr/share/";
+
+ new_system_data_dirs = g_build_path (":",
+- old_system_data_dirs, DATADIR "/gdm/", NULL);
++ old_system_data_dirs, DATADIR "/gdm/", DATADIR "/", NULL);
+
+ g_setenv ("XDG_DATA_DIRS", new_system_data_dirs, TRUE);
+
+@@ -3792,7 +3792,7 @@ session_child_run (struct passwd *pwent,
+ gdm_child_exit (DISPLAY_REMANAGE,
+ _("%s: setusercontext () failed for %s. "
+ "Aborting."), "session_child_run",
+- login);
++ login_user);
+ #else
+ if G_UNLIKELY (setuid (pwent->pw_uid) < 0)
+ gdm_child_exit (DISPLAY_REMANAGE,
diff --git a/x11/gdm/patches/patch-ap b/x11/gdm/patches/patch-ap
new file mode 100644
index 00000000000..24c32a2cb71
--- /dev/null
+++ b/x11/gdm/patches/patch-ap
@@ -0,0 +1,74 @@
+$NetBSD: patch-ap,v 1.1 2007/11/30 20:08:39 drochner Exp $
+
+--- ./daemon/gdm-xdmcp-manager.c.orig 2007-11-27 00:12:29.000000000 +0100
++++ ./daemon/gdm-xdmcp-manager.c
+@@ -63,7 +63,7 @@
+ * On Sun, we need to define allow_severity and deny_severity to link
+ * against libwrap.
+ */
+-#ifdef __sun
++#if defined(__sun) || defined(__NetBSD__)
+ #include <syslog.h>
+ int allow_severity = LOG_INFO;
+ int deny_severity = LOG_WARNING;
+@@ -369,12 +369,14 @@ ai_flags_str (struct addrinfo *ai)
+ if (ai->ai_flags & AI_NUMERICSERV) {
+ g_string_append (str, "numserv ");
+ }
++#if 0
+ if (ai->ai_flags & AI_V4MAPPED) {
+ g_string_append (str, "v4mapped ");
+ }
+ if (ai->ai_flags & AI_ALL) {
+ g_string_append (str, "all ");
+ }
++#endif
+ }
+ return g_string_free (str, FALSE);
+ }
+@@ -404,6 +406,14 @@ create_socket (struct addrinfo *ai)
+ return sock;
+ }
+
++#if defined(__NetBSD__) && ENABLE_IPV6
++ /* NetBSD defaults to V6ONLY */
++ {
++ int no = 0;
++ setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &no, sizeof(no));
++ }
++#endif
++
+ if (bind (sock, ai->ai_addr, ai->ai_addrlen) < 0) {
+ g_warning ("bind: %s", g_strerror (errno));
+ close (sock);
+@@ -1259,7 +1269,9 @@ create_sa_from_request (ARRAY8 *req_addr
+
+ memset (&hints, 0, sizeof (hints));
+ hints.ai_family = family;
++#if !defined(__NetBSD__) || defined(AI_V4MAPPED)
+ hints.ai_flags = AI_V4MAPPED; /* this should convert IPv4 address to IPv6 if needed */
++#endif
+ if ((gaierr = getaddrinfo (host, serv, &hints, &ai_list)) != 0) {
+ g_warning ("Unable get address: %s", gai_strerror (gaierr));
+ return FALSE;
+@@ -1278,6 +1290,20 @@ create_sa_from_request (ARRAY8 *req_addr
+
+ freeaddrinfo (ai_list);
+
++#if defined(__NetBSD__) && !defined(AI_V4MAPPED)
++ if (!found && family == AF_INET6 && req_addr->length == 4 && sap) {
++ struct sockaddr_in6 *sa = g_malloc(sizeof(struct sockaddr_in6));
++ memset(sa, 0, sizeof(struct sockaddr_in6));
++ sa->sin6_len = sizeof(struct sockaddr_in6);
++ sa->sin6_family = AF_INET6;
++ sa->sin6_port = port;
++ memset(&sa->sin6_addr.s6_addr[10], 0xff, 2);
++ memcpy(&sa->sin6_addr.s6_addr[12], req_addr->data, 4);
++ *sap = sa;
++ found = TRUE;
++ }
++#endif
++
+ return found;
+ }
+
diff --git a/x11/gdm/patches/patch-aq b/x11/gdm/patches/patch-aq
new file mode 100644
index 00000000000..5835456ac26
--- /dev/null
+++ b/x11/gdm/patches/patch-aq
@@ -0,0 +1,18 @@
+$NetBSD: patch-aq,v 1.1 2007/11/30 20:08:39 drochner Exp $
+
+--- ./gui/gdmchooser.c.orig 2007-11-27 00:11:04.000000000 +0100
++++ ./gui/gdmchooser.c
+@@ -1123,6 +1123,13 @@ gdm_chooser_xdmcp_init (char **hosts)
+ have_ipv6 = FALSE;
+ else
+ have_ipv6 = TRUE;
++#ifdef __NetBSD__
++ /* NetBSD defaults to V6ONLY */
++ {
++ int no = 0;
++ setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY, &no, sizeof(no));
++ }
++#endif
+ #endif
+ if ( ! have_ipv6) {
+ if ((sockfd = socket (AF_INET, SOCK_DGRAM, 0)) == -1) {