diff --git a/common/os_calls.c b/common/os_calls.c index 5db59caa..76685a40 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -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 #endif diff --git a/configure.ac b/configure.ac index c7b1d41e..3ad76565 100644 --- a/configure.ac +++ b/configure.ac @@ -28,6 +28,9 @@ case $host_os in *linux*) linux=yes ;; + *kfreebsd*) + linux=yes # only used in instfiles/ so that’s ok for us for now + ;; *freebsd*) freebsd=yes ;; diff --git a/sesman/session.c b/sesman/session.c index cf6f45c4..a672e93e 100644 --- a/sesman/session.c +++ b/sesman/session.c @@ -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