Fix build under FreeBSD 9.0-CURRENT.

PR:		141743
This commit is contained in:
Cy Schubert 2009-12-21 23:16:04 +00:00
parent ce2040e29e
commit ba8a0cfdfe
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=246404

View file

@ -1,6 +1,30 @@
--- utmp.c.orig Mon Sep 8 16:27:17 2003
+++ utmp.c Wed Oct 19 14:58:40 2005
@@ -726,9 +728,12 @@
--- utmp.c.orig 2003-09-08 07:27:17.000000000 -0700
+++ utmp.c 2009-12-21 15:10:06.000000000 -0800
@@ -21,6 +21,9 @@
****************************************************************
*/
+#ifdef __FreeBSD__
+#include <sys/param.h>
+#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -70,8 +73,13 @@
* (won't work for login-slots)
*/
#if (defined(sun) && defined(SVR4) && defined(GETUTENT)) || defined(HAVE_UTEMPTER)
+/* XXX FreeBSD-9 includes libutempter however if UTMP_HELPER is defined,
+ the build is broken due to utmpfd not being defined.
+*/
+#if defined(__FreeBSD_version) && __FreeBSD_version < 900004 || !defined(__FreeBSD_version)
# define UTMP_HELPER
#endif
+#endif
@@ -726,9 +734,12 @@
char *line, *user;
int pid;
{
@ -14,4 +38,3 @@
}
static slot_t