summaryrefslogtreecommitdiffstats
path: root/tdm/kfrontend
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2015-06-12 02:56:58 +0200
committerSlávek Banko <[email protected]>2015-06-12 03:00:32 +0200
commit46b20a55775c6c44591ff2d2d423399887ebc806 (patch)
tree6e2264bf4578861f4adacce599e43a63441a7a0c /tdm/kfrontend
parent32eee8cad4fd7bf38b98e5c8db0455bed75e03bc (diff)
downloadtdebase-46b20a55775c6c44591ff2d2d423399887ebc806.tar.gz
tdebase-46b20a55775c6c44591ff2d2d423399887ebc806.zip
Fix FTBFS on freebsd
Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 08122b137e76ffcf7067f634a7668002732e11d9)
Diffstat (limited to 'tdm/kfrontend')
-rw-r--r--tdm/kfrontend/gentdmconf.c12
-rw-r--r--tdm/kfrontend/kgreeter.cpp5
2 files changed, 14 insertions, 3 deletions
diff --git a/tdm/kfrontend/gentdmconf.c b/tdm/kfrontend/gentdmconf.c
index 9a7bc1258..0576eef56 100644
--- a/tdm/kfrontend/gentdmconf.c
+++ b/tdm/kfrontend/gentdmconf.c
@@ -44,7 +44,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <limits.h>
#include <sys/stat.h>
#include <sys/param.h>
-#ifdef BSD
+#if defined(BSD) && !defined(HAVE_UTMPX)
# include <utmp.h>
#endif
@@ -1537,8 +1537,13 @@ edit_startup( File *file )
"fi\n") |
#else
# ifdef BSD
+# ifdef HAVE_UTMPX
+ delstr( file, "\n"
+"exec sessreg -a -l $DISPLAY -x */Xservers $USER\n" ) |
+# else
delstr( file, "\n"
"exec sessreg -a -l $DISPLAY -x */Xservers -u " _PATH_UTMP " $USER\n" ) |
+# endif
# endif
#endif /* _AIX */
delstr( file, "\n"
@@ -1586,8 +1591,13 @@ edit_reset( File *file )
"fi\n" ) |
#else
# ifdef BSD
+# ifdef HAVE_UTMPX
+ delstr( file, "\n"
+"exec sessreg -d -l $DISPLAY -x */Xservers $USER\n" ) |
+# else
delstr( file, "\n"
"exec sessreg -d -l $DISPLAY -x */Xservers -u " _PATH_UTMP " $USER\n" ) |
+# endif
# endif
#endif /* _AIX */
delstr( file, "\n"
diff --git a/tdm/kfrontend/kgreeter.cpp b/tdm/kfrontend/kgreeter.cpp
index 74e04bf31..aa89fd78e 100644
--- a/tdm/kfrontend/kgreeter.cpp
+++ b/tdm/kfrontend/kgreeter.cpp
@@ -70,9 +70,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
-#include <utmp.h>
#ifdef HAVE_UTMPX
-#include <utmpx.h>
+# include <utmpx.h>
+#else
+# include <utmp.h>
#endif
#include <stdio.h>