Add GNU/kFreeBSD support (#645)

* GNU/kFreeBSD is a FreeBSD variant, for code purposes.

* GNU/kFreeBSD uses GNU/Linux-ish init scripts, however.
This commit is contained in:
mirabilos 2017-01-27 02:02:41 +01:00 committed by Itamar Reis Peixoto
parent 0bb048d35e
commit 6257bae23f
3 changed files with 6 additions and 3 deletions

View File

@ -87,8 +87,8 @@ extern char **environ;
#endif
/* sys/ucred.h needs to be included to use struct xucred
* in FreeBSD and OS X. No need for other BSDs */
#if defined(__FreeBSD__) || defined(__APPLE__)
* in FreeBSD and OS X. No need for other BSDs except GNU/kFreeBSD */
#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
#include <sys/ucred.h>
#endif

View File

@ -28,6 +28,9 @@ case $host_os in
*linux*)
linux=yes
;;
*kfreebsd*)
linux=yes # only used in instfiles/ so thats ok for us for now
;;
*freebsd*)
freebsd=yes
;;

View File

@ -503,7 +503,7 @@ session_start_fork(tbus data, tui8 type, struct SCP_SESSION *s)
g_sprintf(geometry, "%dx%d", s->width, s->height);
g_sprintf(depth, "%d", s->bpp);
g_sprintf(screen, ":%d", display);
#ifdef __FreeBSD__
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
/*
* FreeBSD bug
* ports/157282: effective login name is not set by xrdp-sesman