$OpenBSD: patch-daemon_gdm-xdmcp-manager_c,v 1.2 2008/11/21 17:43:02 jasper Exp $
--- daemon/gdm-xdmcp-manager.c.orig	Mon Jun 30 19:53:13 2008
+++ daemon/gdm-xdmcp-manager.c	Tue Nov 18 22:55:23 2008
@@ -30,6 +30,7 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/utsname.h>
+#include <tcpd.h>
 
 #include <sys/socket.h>
 #include <netdb.h>
@@ -64,7 +65,7 @@
  * On Sun, we need to define allow_severity and deny_severity to link
  * against libwrap.
  */
-#ifdef __sun
+#if defined(__sun) || defined(__OpenBSD__)
 #include <syslog.h>
 int allow_severity = LOG_INFO;
 int deny_severity = LOG_WARNING;
@@ -84,6 +85,13 @@ int deny_severity = LOG_WARNING;
 #define GDM_MAX_FORWARD_QUERIES 10
 #define GDM_FORWARD_QUERY_TIMEOUT 30
 #define MANAGED_FORWARD_INTERVAL 1500 /* 1.5 seconds */
+
+#ifndef AI_ALL
+#define AI_ALL 0
+#endif
+#ifndef AI_V4MAPPED
+#define AI_V4MAPPED 0
+#endif
 
 /* some extra XDMCP opcodes that xdm will happily ignore since they'll be
  * the wrong XDMCP version anyway */
