1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00

- Fix build on HEAD

Submitted by:	ed@
This commit is contained in:
Martin Wilke 2010-02-09 19:35:27 +00:00
parent 01b6b000e2
commit 1bbc977b7a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=249487
4 changed files with 96 additions and 0 deletions

View File

@ -0,0 +1,31 @@
--- kdm/backend/dm.h
+++ kdm/backend/dm.h
@@ -104,7 +104,6 @@
# define Jmp_buf sigjmp_buf
#endif
-#include <utmp.h>
#ifdef HAVE_UTMPX
# include <utmpx.h>
# define STRUCTUTMP struct utmpx
@@ -117,6 +116,7 @@
# define ut_time ut_tv.tv_sec
# define ll_time ll_tv.tv_sec
#else
+# include <utmp.h>
# define STRUCTUTMP struct utmp
# define UTMPNAME utmpname
# define SETUTENT setutent
@@ -124,9 +124,9 @@
# define PUTUTLINE pututline
# define ENDUTENT endutent
# define LASTLOG lastlog
-#endif
-#ifndef HAVE_STRUCT_UTMP_UT_USER
-# define ut_user ut_name
+# ifndef HAVE_STRUCT_UTMP_UT_USER
+# define ut_user ut_name
+# endif
#endif
#ifndef WTMP_FILE
# ifdef _PATH_WTMPX

View File

@ -0,0 +1,24 @@
--- kdm/backend/sessreg.c
+++ kdm/backend/sessreg.c
@@ -43,6 +43,13 @@
# define NO_LASTLOG
#endif
+#ifdef __FreeBSD__
+# include <sys/param.h>
+# if __FreeBSD_version >= 900007
+# define NO_LASTLOG
+# endif
+#endif
+
#ifndef NO_LASTLOG
# ifdef HAVE_LASTLOG_H
# include <lastlog.h>
@@ -254,7 +261,6 @@
close( utmp );
}
# else
- UTMPNAME( UTMP_FILE );
SETUTENT();
PUTUTLINE( &ut_ent );
ENDUTENT();

View File

@ -0,0 +1,30 @@
--- kdm/kfrontend/genkdmconf.c
+++ kdm/kfrontend/genkdmconf.c
@@ -44,9 +44,6 @@
#include <limits.h>
#include <sys/stat.h>
#include <sys/param.h>
-#ifdef BSD
-# include <utmp.h>
-#endif
#include "config.ci"
@@ -1592,7 +1589,7 @@
#else
# ifdef BSD
delstr( file, "\n"
-"exec sessreg -a -l $DISPLAY -x */Xservers -u " _PATH_UTMP " $USER\n" ) |
+"exec sessreg -a -l $DISPLAY -x */Xservers $USER\n" ) |
# endif
#endif /* _AIX */
delstr( file, "\n"
@@ -1641,7 +1638,7 @@
#else
# ifdef BSD
delstr( file, "\n"
-"exec sessreg -d -l $DISPLAY -x */Xservers -u " _PATH_UTMP " $USER\n" ) |
+"exec sessreg -d -l $DISPLAY -x */Xservers $USER\n" ) |
# endif
#endif /* _AIX */
delstr( file, "\n"

View File

@ -0,0 +1,11 @@
--- kdecore/kpty.cpp
+++ kdecore/kpty.cpp
@@ -68,7 +68,7 @@
#include <unistd.h>
#include <grp.h>
-#ifdef HAVE_LIBUTIL_H
+#if defined(HAVE_LIBUTIL_H) && __FreeBSD_version < 900007
# include <libutil.h>
# define USE_LOGIN
#elif defined(HAVE_UTIL_H)