[PATCH] xdm: Add headers for implicitly declared function

Alive 4ever alive4ever at live.com
Mon Jul 25 02:52:15 UTC 2016


Added headers needed to suppress implicit function declaration error.
This fixes build on gcc 6.1.1 and clang 3.8.0.

Signed-off-by: Alif M. Ahmad <alive4ever at live.com>
---
 xdm/choose.c  | 5 +++++
 xdm/genauth.c | 4 ++++
 xdm/session.c | 4 ++++
 3 files changed, 13 insertions(+)

diff --git a/xdm/choose.c b/xdm/choose.c
index f7472f5..8ffb63b 100644
--- a/xdm/choose.c
+++ b/xdm/choose.c
@@ -35,6 +35,11 @@ in this Software without prior written authorization from The Open Group.
 #include "dm.h"
 #include "dm_error.h"
 
+#ifdef HAVE_SETPROCTITLE
+# include <bsd/unistd.h>
+#endif
+
+
 #ifdef XDMCP
 
 # include <X11/X.h>
diff --git a/xdm/genauth.c b/xdm/genauth.c
index f50be3b..75b6422 100644
--- a/xdm/genauth.c
+++ b/xdm/genauth.c
@@ -43,6 +43,10 @@ from The Open Group.
 #include <time.h>
 #define Time_t time_t
 
+#ifdef HAVE_ARC4RANDOM
+#include <bsd/stdlib.h>
+#endif
+
 #ifdef HASXDMAUTH
 static unsigned char	key[8];
 #endif
diff --git a/xdm/session.c b/xdm/session.c
index 4f71d71..4873229 100644
--- a/xdm/session.c
+++ b/xdm/session.c
@@ -37,6 +37,10 @@ from The Open Group.
 # include "config.h"
 #endif
 
+#ifdef HAVE_SETPROCTITLE
+#include <bsd/unistd.h>
+#endif
+
 #include "dm.h"
 #include "dm_auth.h"
 #include "dm_error.h"
-- 
2.9.0



More information about the xorg-devel mailing list