$OpenBSD: patch-daemon_gdm-xdmcp-display-factory_c,v 1.4 2012/10/10 12:34:35 ajacoutot Exp $
--- daemon/gdm-xdmcp-display-factory.c.orig	Thu Sep  6 20:33:20 2012
+++ daemon/gdm-xdmcp-display-factory.c	Wed Oct 10 15:55:48 2012
@@ -35,6 +35,7 @@
 #include <netdb.h>
 #include <arpa/inet.h>
 #include <net/if.h>
+#include <netinet/in.h>
 #ifdef HAVE_SYS_SOCKIO_H
 #include <sys/sockio.h>
 #endif
@@ -376,12 +377,14 @@ ai_flags_str (struct addrinfo *ai)
                 if (ai->ai_flags & AI_NUMERICSERV) {
                         g_string_append (str, "numserv ");
                 }
+#ifndef __OpenBSD__
                 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);
 }
@@ -1526,8 +1529,10 @@ create_address_from_request (ARRAY8      *req_addr,
 
         memset (&hints, 0, sizeof (hints));
         hints.ai_family = family;
+#ifndef __OpenBSD__
         /* this should convert IPv4 address to IPv6 if needed */
         hints.ai_flags = AI_V4MAPPED;
+#endif
         hints.ai_socktype = SOCK_DGRAM;
 
         if ((gaierr = getaddrinfo (host, serv, &hints, &ai_list)) != 0) {
@@ -2009,8 +2014,10 @@ on_hostname_selected (GdmXdmcpChooserDisplay *display,
 
         memset (&hints, 0, sizeof (hints));
         hints.ai_family = gdm_address_get_family_type (address);
+#ifndef __OpenBSD__
         /* this should convert IPv4 address to IPv6 if needed */
         hints.ai_flags = AI_V4MAPPED;
+#endif
 
         xdmcp_port = g_strdup_printf ("%d", XDM_UDP_PORT);
         if ((gaierr = getaddrinfo (hostname, xdmcp_port, &hints, &ai_list)) != 0) {
