diff options
author | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2014-01-06 15:52:47 +0000 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2019-01-01 15:16:05 -0800 |
commit | 7a56946260616f7f5ff43ecbaac1f2ada9b0afcd (patch) | |
tree | 99803040311328fb01f890fa3155c04636ea2c70 | |
parent | 786b2c7ed39fb0cdd4c34e51f5c58f980087dcc1 (diff) |
xdm uses setproctitle without proper includes for Linux libbsd
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xdm/choose.c | 8 | ||||
-rw-r--r-- | xdm/session.c | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/xdm/choose.c b/xdm/choose.c index f7472f5..7158a7c 100644 --- a/xdm/choose.c +++ b/xdm/choose.c @@ -48,6 +48,14 @@ in this Software without prior written authorization from The Open Group. # include <errno.h> +# ifdef HAVE_SETPROCTITLE +# ifdef __linux__ +# include <bsd/unistd.h> +# else +# include <unistd.h> +# endif +# endif + # include <time.h> # define Time_t time_t diff --git a/xdm/session.c b/xdm/session.c index 4ab98c1..b1ae322 100644 --- a/xdm/session.c +++ b/xdm/session.c @@ -51,6 +51,15 @@ from The Open Group. #include <ctype.h> #include <grp.h> /* for initgroups */ +# ifdef HAVE_SETPROCTITLE +# include <sys/types.h> +# ifdef __linux__ +# include <bsd/unistd.h> +# else +# include <unistd.h> +# endif +# endif + #ifndef USE_PAM /* PAM modules should handle these */ # ifdef SECURE_RPC # include <rpc/rpc.h> |