summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <Alan.Coopersmith@sun.com>2006-02-25 02:21:51 +0000
committerAlan Coopersmith <Alan.Coopersmith@sun.com>2006-02-25 02:21:51 +0000
commit6729f4df2d314a3573f3da7da3fc364cb48685de (patch)
tree8bd2874abcd409a9d8569af344c61dea1064fa27
parentebec01137a6b200ee9432faecde5817670b41684 (diff)
Bug #6036 <https://bugs.freedesktop.org/show_bug.cgi?id=6036> Check for
key_setnet declaration before defining it to avoid compiler error of conflicting types on DragonFly BSD
-rw-r--r--ChangeLog8
-rw-r--r--configure.ac9
-rw-r--r--session.c4
3 files changed, 20 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f62904f..74a31f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2006-02-24 Alan Coopersmith <alan.coopersmith@sun.com>
+ * configure.ac:
+ * session.c:
+ Bug #6036 <https://bugs.freedesktop.org/show_bug.cgi?id=6036>
+ Check for key_setnet declaration before defining it to avoid
+ compiler error of conflicting types on DragonFly BSD
+
+2006-02-24 Alan Coopersmith <alan.coopersmith@sun.com>
+
* netaddr.c:
Bug #6026 <https://bugs.freedesktop.org/show_bug.cgi?id=6026>
Segfault in netaddr.c:ConvertAddr if ifa_addr is NULL
diff --git a/configure.ac b/configure.ac
index 657fcab..157572d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,6 +73,15 @@ dnl Sets $SECURE_RPC to "yes" or "no"
XTRANS_SECURE_RPC_FLAGS
AM_CONDITIONAL(HAS_SECURE_RPC, test x$SECURE_RPC = xyes)
+dnl Is key_setnet defined in a header file?
+AC_CHECK_DECL(key_setnet,
+ AC_DEFINE(HAVE_DECL_KEY_SETNET,1,
+ [Define to 1 if your headers define the key_setnet() function.]),
+ [],[
+#include <rpc/rpc.h>
+#include <rpc/key_prot.h>
+])
+
# darwin could have PAM support, but not yet
case $host_os in
darwin*)
diff --git a/session.c b/session.c
index 05aa1dc..af2098a 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/xdm/session.c,v 1.1.4.4 2003/12/06 13:24:29 kaleb Exp $ */
+/* $XdotOrg: app/xdm/session.c,v 1.3 2005/11/08 06:33:31 jkj Exp $ */
/* $Xorg: session.c,v 1.8 2001/02/09 02:05:40 xorgcvs Exp $ */
/*
@@ -55,7 +55,9 @@ from The Open Group.
#ifdef SECURE_RPC
# include <rpc/rpc.h>
# include <rpc/key_prot.h>
+# if !HAVE_DECL_KEY_SETNET
extern int key_setnet(struct key_netstarg *arg);
+# endif
#endif
#ifdef K5AUTH
# include <krb5/krb5.h>